Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Sunday, September 24, 2017 1:35 PM | 1 vote
I use robocopy /mir to backup my local files. I also use OneDrive files on demand to save space. When I run robocopy, it attempts to download the onedrive placeholders. Is there a way to skip these files via robocopy command line?
All replies (2)
Sunday, September 24, 2017 6:10 PM
Does not appear to me Robocopy understands placeholders, so guess that would need a Robocopy update for it to skip them automatically.
The way around that the folders can be excluded from Robocopy.
robocopy %USERPROFILE% C:\BackupTemp *.* /R:1 /W:0 /MIR /XD %USERPROFILE%\OneDrive
Wednesday, August 14, 2019 4:46 PM
For anyone else looking for this..
The syntax shown only works when you call robocopy from cmd.exe, not from powershell because the %userprofile% syntax didn't work.. I was too lazy to find the equivalent, so I seem to be having luck with using powershell to call cmd.exe and running the command like this:
cmd.exe /c robocopy %USERPROFILE% C:\BackupTemp *.* /R:1 /W:0 /MIR /XD %USERPROFILE%\OneDrive