Share via

Robocopy invalid parameter

Anonymous
2010-05-01T18:47:45+00:00

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

Windows for home | Previous Windows versions | Files, folders, and storage

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.

0 comments No comments

Answer accepted by question author

Anonymous
2010-05-02T07:57:15+00:00

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


Boulder Computer Maven

Microsoft Most Valuable Professional

Was this answer helpful?

10+ people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2013-04-22T14:11:44+00:00

    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.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments