I’m running the latest beta version of rclone and just noticed that empty directories did not get copied into our team drives. I found a discussion in the rclone repo related to this and i believe there was mention of including that feature in v1.37 but I can’t recall exactly. Does anyone know if there’s a workaround that will allow us to copy empty directories to team drive?
We’re trying to migrate off our old WinServ2012R2 file server since it is not as heavily used as we originally anticipated. I’d like the folder structure on the file server to stay in tact even if the directories are empty. Our users get confused really easily and I have a feeling IT is going to get blamed for “missing” files if we don’t leave everything as-is.
Crude but on Linux I would run a find command too locate all the empty directories and put a file in them with a specific name, sync it, then delete all occurrences of that file leaving the empty directories… I’m sure you can accomplish that with powershell on Windows but not sure.
well, it was kind of annoying but i ended up doing what you recommended. Ran a powershell command to find all empty directories, created a new file with a single line. Ran rclone sync, ran another powershell command to delete the temp file, ran another rclone sync command. :’(
$emptyDirs | % {New-Item $_.FullName -ItemType file -Name temp.txt -Value “This is a string.”}
That portion creates the file in any empty directories from the list of shares being checked. After this, i run the first rclone sync then I run this line of code:
@ncw Has this been implemented in 1.38? Im looking at the release notes and it looks like the ability to automatically delete empty directories was added but doesn’t appear to be a way to copy over empty directories. Only reason I don’t want to create a temp text files in all empty directories, running the rclone sync, then removing the temp files and re-running an rclone sync again is we have some windows shares that have 200GB+ data. Not sure if the sync command will attempt to re-sync everything all over again or just what’s changed.
I’ve only tested on a small dataset and even with that small set, the sync/re-sync still takes a bit of time.