Remove the final backslash from each directory specification, and put spaces between the options:
Robocopy "C:\Users\My Name\My Documents" "K:\My Documents Home 050110" /MT:120 /E /XO
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am getting the error invalid parameter
with Robocopy. An earlier Vista post said to use double quotes for directory names with spaces which I am doing. Here is the example cmd command:
Robocopy "C:\Users\My Name\My Documents" "K:\My Documents Home 050110" /MT:120/E/XO
The Robocopy response is:
Started : Sat May 01 13:05:20 2010
Source - C:\Users\Jim Langendonk\My Documents" K:\My
Dest - C:\Windows\system32\Documents\
Files : Home
050110"
Options : /COPY:DAT /R:1000000 /W:30
As you can see, lots of errors here from not recognizing the destination, files not defaulting to *.*, and not recognizing the options. Any help is appreciated. I used to use XCOPY on XP but XCOPY is not working on this new Windows 7 machine either.
Regards,
Jim
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Remove the final backslash from each directory specification, and put spaces between the options:
Robocopy "C:\Users\My Name\My Documents" "K:\My Documents Home 050110" /MT:120 /E /XO
I got the error #7 and it took some time to figure out the issue. Like someone else said, it had to be simple, because I reused a batch file and all I did was change the path of the log file.
And I forgot, different OS means different Robocopy.
I analyzed the logging parameter string:
I double checked the existance of the folder.
/LOG:"C:\Logs\Log%date:~3,10%.txt /V /NFL /NDL" => FAIL
then
/LOG:C:"\Logs\Log%date:~3,10%.txt /V /NFL /NDL" => FAIL
Then I got my "D'oh!" moment:
/LOG:C:"\Logs\Log%date:~3,10%.txt" /V /NFL /NDL => SUCCESS!
It took me a while to understand Windows 7 reads the string as a whole in the batch, but the quotes are for the path and since the "/" is an invalid character in command prompt I got an error.