my solution is to copy a placeholder file into every folder of the vault.
pls see:
You can do this using the for command with the /r switch, which is used to enumerate a directory tree. For example, this will copy the C:\a.jpg file to the C:\Test folder and all of its subfolders:
for /r “C:\Test” %%f in (.) do (
copy “C:\a.jpg” “%%~ff” > nul
)
The for /r “C:\Test” %%f in (.) statement enumerates the C:\Test folder and all its subfolders and %%~ff returns the current folder name.
I can run this by installing cygwin in windows.
Tested with rclone sync. Yes the target also contain the 0 byte dummp file.
The script worked, thankyou.
ps: cygwin is signatured so is safe to use.
there is a small tool “remove empty directory” that u can check whether there is empty folder before using rclone.
so that u sure there is no empty folder and everything is rclone-ed.
but it’s un-signed and I have to run it under sandboxie.
rclone can do this too.... You could run rclone rmdirs --dry-run /path/to/wherever which would normally remove all empty directories, but with the --dry-run will just show them instead.