New
#1
Robocopy syntax doesn't work in my batch file anymore
I created the following text file & then changed the extension to .bat. The syntax is:
Robocopy "C:\Users\Phil\AppData\Roaming\Thunderbird\Profiles\MyProfile" "E:\Backups\Thunderbird\Profiles\MyProfile" /MIR /Z /W:5 /TS /MOT:180 /R:10
I also created a shortcut for it on my desktop.
If I paste this into Powershell or Powershell (run as administrator), it works fine. When I first created it, I could double click it & it would run fine. In order to get the batch file to work now, I have to right click it & choose "Run as administrator". Can anyone explain what's happening?
I should add that I left off an additional option: /RH: 0130-0140 that allows it to run only between 0130 & 0140 AM. However, it hasn't run for 2 days. It used to be that I would simply edit the batch file by pressing enter after /R:10 so that the whole thing read:
Robocopy "C:\Users\Phil\AppData\Roaming\Thunderbird\Profiles\MyProfile" "E:\Backups\Thunderbird\Profiles\MyProfile" /MIR /Z /W:5 /TS /MOT:180 /R:10
/RH: 0130-0140
This would allow me to run it manually. Then I could delete the "return" & have it run only 130-140. In any event, I don't know why it doesn't work any more. Any help would be appreciated!
I may have found the answer, but I'd appreciate some knowledgeable advice. I changed the name of the batch file from Copy.bat to Robocopy.bat. Apparently, Windows doesn't like that. When I changed it to any other name, it worked. Can someone please explain that?
Thank you in advance!