PDA

View Full Version : Solved: DOS-copy Bat file



Victor
09-15-2009, 06:58 AM
Hi all:

I created a batch file as follows:

backup.bat
copy 2.xls 3.xls

When both the bat file and the files(2.xls and 3.xls) are in the same directory) it runs without problem.
(i.e. c:\)

But when I specified the directory I want to copy the file(i.e.
copy 2.xls c:\victor\3.xls) I got the followinf message:

"The syntax of the command is incorrect."

I check the spelling and everything looks fine to me.

Any ideas how I can I do it, please.

Thanks for the help.

Victor

Victor
09-15-2009, 07:43 AM
I found the solution:

Just type your copy command having care to surround the directories (and files) with blanks or special characters between "

Thanks

Victor