Page 1 of 1

Copy command doesn't work with batch file in windows 7

PostPosted: Tue Oct 27, 2009 3:15 pm
by owen
I have recently installed Windows 7 but not able to run the copy command at the command prompt.

For example if I enter

copy abc c:\

It copies the abc file to c:\. Now when I create a batch file from this command and run it with administrative rights, I get the error “cannot find the file”! And when I run the batch file without administrator privileges, I get the message” 'access denied”, How to solve this issue?

Re: Copy command doesn't work with batch file in windows 7

PostPosted: Sun Nov 08, 2009 5:16 pm
by sebastian
This particularly happens around %, ", and \ .

Try this
system copy abc c:/

Re: Copy command doesn't work with batch file in windows 7

PostPosted: Sun Nov 08, 2009 5:17 pm
by shamus
The copy command does not work when you have spaces in your filenames you have to enclose them in quotes.