Botched Up
Botched Up

Reputation:

Making batch file for copying

Can anyone advise me please im using Windows XP Pro on C drive and need to be able to copy a file from one drive to another. This case original will have to be renamed and old file must be put on another Partiton which is on a Server Example K drive. Alternately There is another option using Windows 7 on a another computer instead of Windows XP Pro. So any answers appreciated.

Upvotes: 0

Views: 938

Answers (5)

rud3y
rud3y

Reputation: 2342

XCOPY Command:

xcopy c:\sourceDirectory\*.* d:\destinationDirectory\*.* /D /E /C /R /Y

ROBOCOPY Command:

robocopy c:\sourceDirectory\*.* d:\destinationDirectory\*.* /R:5 /W:3 /Z /XX /TEE

Either of these should work for you

Upvotes: 1

Rob Kam
Rob Kam

Reputation: 10278

Enter copy /? or xcopy /? to find out the available options - if you append >file.txt you'll get them in a text file.

Upvotes: 1

Andy White
Andy White

Reputation: 88475

If your permissions are setup to allow copying, you can use "UNC" paths to copy files across servers and drives.

Like Noah said, check out ROBOCOPY or the slightly less featured XCOPY.

Upvotes: 1

the_drow
the_drow

Reputation: 19201

A quick look on my old DOS book that I saved just in case that I have to make batch files says COPY is the right command.
Syntax:

COPY DRIVE:FILENAME DRIVE:FILENAME
COPY THISFILE THATFILE

Upvotes: 1

NoahD
NoahD

Reputation: 8302

Have you looked into robocopy?

Upvotes: 0

Related Questions