Copying top-level empty folder

Thanks for your work on Rclone, we are finding it an excellent solution to our file transfer problems.

One question is whether it is possible to copy a directory tree if the top-level path is empty. We are using rclone v1.5.9.2 (Windows 10 pro) on local / mounted filesystems. For example:

rclone copy D:\one\two\three remote:C:\one\two\three --create-empty-src-dirs

will create the directory tree if there is a file or empty directory in directory \three. However, if \three is empty then the directory tree is not copied (note, all directories in this tree are empty except for the listed directories).

This is a bit of an edge-case but it would be nice for our usage if the empty tree was copied, are there any workarounds to force this behaviour in Rclone?

Many thanks!

Hi Joseph,

I guess you could do something like this:

rclone mkdir remote:one\two\three
rclone copy D:\one\two\three remote:one\two\three --create-empty-src-dirs

Thanks Ole, in the end we realised we will need a .metadata folder in the possibly empty directories we were creating, and so they will never be empty. Thanks!

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