If I have the following directorys: D:\hello and D:\goodbye and I want to sync everything in those two directorys in diferent destinations in Drive. How would the comand go to do that?
I’m able to do it one by one, but it would help if I didn’t have to do the same comand twice and just put it all in the same comand.
One approach is to use the “–include-from” option.
Another approach is to script this, so the command gets run twice on your behalf. For example with powershell (as you are on windows):
$syncDirs="D:\hello,D:\goodbye" foreach($dir in $syncDirs) { rclone <command> <options> }
save as ps1 and allow your win installation to run custom scripts (please read up on this), then just call the script.
You’re not going to be able to sync to two destinations in a single command. The destination is a single destination. You could use trickery to get it to do it by using Linux bind mounts or sym links and to create a directory tree on the source that matches the destination locations though.
Edit: you’re on windows per the title. You could use the same approach with the windows equivalent of symlinks (junction) I think. I don’t use Windows though
So wait, you telling me you have to copy, sync or move the directory and its files from the same directory you are in??
You can’t filter outside the directory you are in?
I’m not quite following what you are trying to do then as your example was using D: and including 2 folders there. I gave you an example to solve that.
OHHHHH, I just realized how dumb I am and that you were outside of both directorys. My bad sry, was thinking about Windows and dindn’t realize you were in Linux.
But now I have another question. I understand how you can backup two seperate directories or even more that are in the same root directory, but can you do the same from D: towards C:?.
Example:
I want to backup D:\hello and D:\goodbye, but now I have C:\magic and I can’t move it because it’s in there and for some magic reasons you can’t move it. What should I do now?
Because from your example you can only backup things that are in the root of the directory you are trying to backup.
Just run another command if you are trying to do different source drives. Not sure there is a way around that but I honestly am not a Windows users so not sure I could offer anymore.