Error in batch file to copy folder: 'Invalid number of parameters'
Posted
by
Daniel
on Super User
See other posts from Super User
or by Daniel
Published on 2012-12-12T16:22:58Z
Indexed on
2012/12/12
17:08 UTC
Read the original article
Hit count: 192
windows-xp
|batch
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?
© Super User or respective owner