Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XCOPY

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
0
0
US
Is there a way to specify multiple files to copy or use a list when using XCOPY?

Example (Something like this):

XCOPY c:\InetPub\*.asp;c:\InetPub\*.inc;c:\InetPub\*.js c:\backup /E /F /S /V /Y

I am using three separate lines to do the above over a slow connection and can see that if the file wildcards can be specified in one line my backup time will be cut down considerably.

Thanks
 
I don't think there is a way to do it with XCOPY directly, but have you thought of creating a CMD file with the three commands in it?

Another option may be to start three command sessions and issue each XCOPY in them. I'm not sure how having all three sets in one command will cut much time at all though. The /V will slow you down a lot, but will help you be sure you got a good copy. JSV
 
If you have the Resource kit you can use the very useful Robocopy. eg

ROBOCOPY c:\InetPub c:\backup *.asp *.inc *.js /E

This will only copy new and more recent files, reducing the overall backup time. I use it to synchronize file shares (for backups etc) over a slow line.

Alternatively you could use PKZIP to create a zip file containing the asp, inc and js files. Then copy this over and unzip on the other server.
 
>> but have you thought of creating a CMD file with the three commands in it

That is what I have now. The problem is that with each command it must restart rescursively going through all the directories (*.asp) for each command. My thought is that it would be quicker if I could grab all three types in one pass.

At present it takes about an hour. I do have it scheduled but on some occasions I need to run it manually and this can tie up my system connectivity to our data center.

>> ROBOCOPY c:\InetPub c:\backup *.asp *.inc *.js /E

I have the NT4 Resource Kit. I will have to check this out either way!

Thanks veru much for you advise,

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top