Rclone rcd, move folder doesn't delete empty source folder

Related to this topic.

OS: Windows 10 x64
rclone: v1.51.0-125-g32df634c-beta

I am performing a move command on a folder via rclone rc, so I am moving a folder between remotes. To be specific, one remote is OneDrive and another is my local disk:

type = onedrive
drive_type = personal

type = local

I send the request with the following parameters:

The folder contents are moved with no problems, but the source keeps the original folder plus all the nested folders it has (although they are now empty).

I read about deleteEmptySrcDirs and tried adding it to the request:

Now all the nested folders are deleted, so that's good, but the original folder itself still is not deleted.

I believe, that is not an expected behavior, is it?

It is expected behaviour. We had a lot of discussions about it on the original issue, but it was felt that the most user friendly thing was to leave the original root directory behind.

But there doesn't currently exist a a flag to do this either right? That might be useful to have.
Of course you could easily enough script in an rmdirs command after, but it seems like a thing that should be an option.

Personally I feel like maybe --delete-empty-src-dirs should do this by default, but as with "rmdirs" command --leave-root should keep the root folder.
Right now rmdirs defaults in the opposite way to move - which isn't ideal.
But on the other hand,this would not be good to just change as it would break back-compat.

A new--delete-root-dir flag wouldn't mess anything up, but the inconsistency of defaults would of course remain.

Oh backwards compatibility :wink:

I'm pretty sure there is an issue about this already if you have a search through the issues! It could be --leave-root=false where the default is true.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.