Copying files using a batch file?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

gazmysta

Thread Starter
Joined
Nov 6, 2003
Messages
90
Hi Guys,

Im trying to copy a file from one folder to another but the batch file is not working, it says incorrect syntax. the command line im using is:

COPY C:\TEST *.* C:\BACKDIR

Does anyone know why this isnt working?

Thanks
 

gazmysta

Thread Starter
Joined
Nov 6, 2003
Messages
90
Ok, ive manage to get it working and it copies the file across using:

C:
XCOPY C:\test C:\backdir

But what i want to do is copy the personal folder in outlook to this file. So when i change it to:

C:
XCOPY C:\Documents and settings\[username]\...........\outllook C:\backdir

Its failing again with the error "Invalid number of parameters"?
 

DoubleHelix

Banned
Joined
Dec 9, 2004
Messages
24,388
You need quotes around path names with spaces:
"C:\Documents and Settings\<username>\...."

And try a trailing backslash at the end of the destination folder. You don't want to copy a folder to a file. You want to copy a folder to a folder.

C:\Backdir\
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top