I'm trying to make a copy of folder structure of the source remote to the destination one without doing anything with the files inside. Is there any efficient way to do this work ?
According to this topic, Nick has suggested a method
rclone copy FROM: TO: --min-size 5000G --create-empty-src-dirs
But here is my problem. Assuming the
FROM remote has 10 sub-folders and 10000 files inside, it will take forever to run the code because it has to check all 10000 files instead of directly creating 10 folders only.
I've come up with an idea that I could use
rclone lsf --dirs-only -R FROM: > folders.txt, and then one by one using
rclone mkdir FROM:/a/folder/path for all the paths in the file
folders.txt. But in my opinion, this is still not the best way to go, especially when the remote has a large amount of folders.
Suggestion: the command
rclone mkdir can be used with the flag
--files-from like this
rclone mkdir FROM: --files-from folders.txt
- os/arch: linux/amd64
- go version: go1.15.8
Google Drive (and others in the future)
(thank you first and sorry for my bad English)