Robocopy copies unwanted folders

Microsoft Windows

Active Members
Joined
Dec 10, 2024
Messages
18,160
So, I'm working on a script that, among other things, backs up Documents folder to USB drive. The issue that I'm having is the same as this guy here:---https://answers.microsoft.com/en-us/windows/forum/all/robocopy-copies-folders-not-in-documents-to-my/dd5de76d-074b-4907-952f-4693639d80f0---Meaning that robocopy copies folders that ot is not told to copy.Command is:Robocopy.exe "C:\Users\$env:username\documents" "D:\$env:username\documents /e /np /teeWhat happens is that after it has copied 4 files under Documents, it starts copying Pictures, Videos and Music even though the command specifical

Continue reading...
 
Back
Top