$ echo "This is a test" > /tmp/xyz/foo.txt
$ ls -l /tmp/xyz/
total 8
-rw-r--r-- 1 greg wheel 15 Oct 10 21:04 foo.txt
$ rclone move "/tmp/xyz" "minio-123:greg/tmp/xyz" --log-level DEBUG --config=rclone.conf --delete-empty-src-dirs
2019/10/10 21:05:50 DEBUG : rclone: Version "v1.49.5" starting with parameters ["rclone" "move" "/tmp/xyz" "minio-123:greg/tmp/xyz" "--log-level" "DEBUG" "--config=rclone.conf" "--delete-empty-src-dirs"]
2019/10/10 21:05:50 DEBUG : Using config file from "rclone.conf"
2019/10/10 21:05:50 INFO : S3 bucket greg path tmp/xyz: Waiting for checks to finish
2019/10/10 21:05:50 INFO : S3 bucket greg path tmp/xyz: Waiting for transfers to finish
2019/10/10 21:05:50 INFO : S3 bucket greg path tmp/xyz: Bucket "greg" created with ACL "private"
2019/10/10 21:05:50 DEBUG : foo.txt: MD5 = ff22941336956098ae9a564289d1bf1b OK
2019/10/10 21:05:50 INFO : foo.txt: Copied (new)
2019/10/10 21:05:50 INFO : foo.txt: Deleted
2019/10/10 21:05:50 INFO :
Transferred: 15 / 15 Bytes, 100%, 244 Bytes/s, ETA 0s
Errors: 0
Checks: 2 / 2, 100%
Transferred: 1 / 1, 100%
Elapsed time: 0s
2019/10/10 21:05:50 DEBUG : 6 go routines active
2019/10/10 21:05:50 DEBUG : rclone: Version "v1.49.5" finishing with parameters ["rclone" "move" "/tmp/xyz" "minio-123:greg/tmp/xyz" "--log-level" "DEBUG" "--config=rclone.conf" "--delete-empty-src-dirs"]
$ ls /tmp/xyz
$ ls -l /tmp/
total 8
...
drwxr-xr-x 2 greg wheel 64 Oct 10 21:05 xyz
In other words, it leaves an empty directory /tmp/xyz after the 'move' completes even though I am using the --delete-empty-src-dirs flag. I am trying to understand why
Thanks in advance
Thank you for the response.
Seems a bit counter intuitive, if you ask me. The usual semantics of 'move' operation includes deleting the source root dir. See Unix 'mv', Windows 'move' , Java Files.move(), etc etc
I think that is what It did when we first implemented it but we changed it because a very common workflow is to move things into a directory to be uploaded and it was annoying to have that directory disappear.
The way it is currently is definitely needed for many workflows, but I kind of agree with bayareagreg that it is perhaps not what you expect and it can be annoying the other way around in some cases.
It might be worth an optional flag, assuming that it would be a fairly trivial implementation and doesn't break anything else.