Page 1 of 1

xcopy error: Invalid number of parameters

Posted: 14 Apr 2022 23:21
by tobwz
I opened Command Prompt and entered the following command:

Code: Select all

xcopy "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" "test" /E /C /H /R /K /Y
and got the following answer:

Invalid number of parameters

The path to %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar exists

Whats wrong?

Re: xcopy error: Invalid number of parameters

Posted: 16 Apr 2022 14:14
by aGerman
Works for me as is.

Steffen

Re: xcopy error: Invalid number of parameters

Posted: 17 Apr 2022 06:29
by Puccilillo
I got questioned if "test" had to be a file or a directory.
But it worked indeed.

I use Windows 10

Puccilillo

Re: xcopy error: Invalid number of parameters

Posted: 17 Apr 2022 09:14
by tobwz
Thank you for comments.

Today I tried to execute the command again.....and it worked.

Very strange.
I have absolute no clue what the reason was.
A missing reboot cannot be the reason. I tried that trick already a couple of does ago.

So ok problem is solved anyway

Re: xcopy error: Invalid number of parameters

Posted: 18 Apr 2022 02:07
by tobwz
I have to revert to this question.

meanwhile I found the problem:

Code: Select all

"%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
Is a System directory.

And Xcopy cannot copy from (this) system directories

When I use xcopy with a normal user directory as source then everything works.
But Command Prompt in general rejects to work with system directories.

Try this basic command:

Code: Select all

cd /d “%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar”
It fails too

Any chance to bypass this restriction?

Re: xcopy error: Invalid number of parameters

Posted: 18 Apr 2022 08:58
by Puccilillo
Still, both working for me.
What Windows version are you on? Do you have admin rights?