General discussion

Locked

Batch Script

By k_grg ·
Hi,
Does anyone know how to write a batch file that would allow me to back up my stuff from PC to multiple Network Drives.
Thank you

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Batch Script

by Working IT In reply to Batch Script

Download "WinZip 8.0" with the Command Line Add-On. It allow you to run the Winzip program from a command prompt. Or try the "Zip Backup to CD", it has a scheduling option, you can specify the size of the zip file.

WinZip and it add-on can be downloaded from www.winzip.com

Zip Backup to CD can be download from www.download.com

Collapse -

Batch Script

by k_grg In reply to Batch Script

Poster rated this answer

Collapse -

Batch Script

by Joseph Moore In reply to Batch Script

Well, you could use XCOPY from the batch script. It is a real good copy command (more power then normal COPY).
The best way to do this type of thing is for the batch file to set up a Net Use mapping to whatever location you want to backup TO, then do the XCOPY, and then remove the Net Use drive mapping.
Here is an example of one I use. This copies an entire website from one web server to another:

net use w: /delete
net use w: \\10.1.1.10\d$
echo "starting replication"
xcopy /e /c /i /q /h /r /d /k /y c:\inetpub\*.* w:\inetpub
echo "completed replicate"
net use w: /delete

Often times, if you try and use an existing drive mapping in an AT schedule, it won't work since AT runs on the local machine under the Local System service account, and that account does not have network access. YOu have to set up the AT schedule with the /INTERACTIVE switch. But you didn't ask anything about scheduling. Sorry. I am rambling on here.

Anyway, set up copies like listed above to all the locations you want to copy to.

Easy.

Collapse -

Batch Script

by k_grg In reply to Batch Script
Collapse -

Batch Script

by chris hirst In reply to Batch Script

a bit extra to answer 2. If you are using NT or 2k you could add /persistent:no to the net use command, This stops the mapping becoming written into the registry ( this does not work with 9x)

Collapse -

Batch Script

by k_grg In reply to Batch Script

Poster rated this answer

Collapse -

Batch Script

by joncr In reply to Batch Script

I would go with 2 but use robocopy off the resource kit if your using NTFS. This is like xcopy but copies all NTFS permissions aswell.

Collapse -

Batch Script

by k_grg In reply to Batch Script

Poster rated this answer

Collapse -

Batch Script

by k_grg In reply to Batch Script

This question was closed by the author

Back to Windows Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums