Solved Copy command in batch file

May 18, 2012 at 04:57:27
Specs: Windows XP

I just want to copy a file from a drive to startup folder in Windows7.

I used the following command;

COPY C:\index.bat C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

After Issuing this command, I got an error,
"The syntax of the command is incorrect"

This error is because there is SPACE in Start Menu folder.

Is there any solution for this?? I

See More: Copy command in batch file

Report •

May 18, 2012 at 07:01:49
✔ Best Answer
You have to use double quotes around paths with spaces.

COPY C:\index.bat "C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"


Report •

May 18, 2012 at 08:51:23
Thanks a lot Tony. Now, its working.

Report •

Related Solutions

Ask Question