Reputation: 3
I have 2 xcopy commands that are virtually identical in that they both contain the same number of paramenters. Only the paths are different. Yet one works and the other fails and produces "Invalid number of parameters". Here's the one that works:
xcopy /S /I /R /Y C:\Users\User\Desktop\Start_Menu_Backup\Database %LOCALAPPDATA%\TileDataLayer\Database
Here's the one that fails:
xcopy /S /I /R /Y C:\Users\User\Desktop\Start_Menu_Backup\icons %APPDATA%\Microsoft\Windows\Start Menu\Programs
Any help would greatly appreciated.
Upvotes: 0
Views: 49
Reputation: 2418
When one of the directories contains a space, you need to enclose it in quote marks:
xcopy /S /I /R /Y C:\Users\User\Desktop\Start_Menu_Backup\icons "%APPDATA%\Microsoft\Windows\Start Menu\Programs"
Upvotes: 1