Error in batch file to copy folder: 'Invalid number of parameters'
- by Daniel
I am making a batch file in Windows XP to copy my folders I need to another folder on my PC. I am getting an error.
I get the error "Invalid number of parameters".
xcopy /s/z D:\Documents and Settings\%username%\Desktop C:\SomeRandomFolder\
xcopy /s/z D:\Documents and Settings\%username%\Favorites C:\SomeRandomFolder\
xcopy /s/z D:\Documents and Settings\%username%\Start Menu C:\SomeRandomFolder\
xcopy /s/z D:\Documents and Settings\%username%\My Documents C:\SomeRandomFolder\
xcopy /s/z D:\Documents and Settings\%username%\PrintHood C:\SomeRandomFolder\
xcopy /s/z D:\Documents and Settings\%username%\NetHood C:\SomeRandomFolder\
xcopy /s/z D:\Documents and Settings\%username%\Templates C:\SomeRandomFolder\
xcopy /s/z D:\Documents and Settings\%username%\Searches C:\SomeRandomFolder\
xcopy /s/z D:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook C:\SomeRandomFolder\
pause
Then I changed the batch and get this error: "File not found - Desktop"
xcopy /s/z D:\...\%username%\Desktop C:\SomeRandomFolder\
pause
How do I fix these errors?