• Advertisement

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

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

Postby owen » Tue Oct 27, 2009 3:15 pm

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?
owen
 
Posts: 43
Joined: Thu May 28, 2009 12:56 pm

Advertisement

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

Postby sebastian » Sun Nov 08, 2009 5:16 pm

This particularly happens around %, ", and \ .

Try this
system copy abc c:/
sebastian
 
Posts: 16
Joined: Thu May 28, 2009 5:27 am

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

Postby shamus » Sun Nov 08, 2009 5:17 pm

The copy command does not work when you have spaces in your filenames you have to enclose them in quotes.
shamus
 
Posts: 17
Joined: Thu May 28, 2009 5:24 am


Return to Windows 7 Programming and Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron