Discussion Locked

Batch file to backup data on a different hard drive

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need help in writing a batch file which will take a backup of files on my server and then push the backup to my local system through LAN.

Kindly note - I don't want the files to be moved to my local system. Rather i want to copy the files to my local system.

2 replies

by twinnii

I've used Robocopy from Windows Resource Kit, or you can use xcopy.
Just go to Start --> Run --> type in "CMD" and press enter.
To see the commands xcopy accepts, simply type in xcopy /? same for Robocopy, but if you do not have it, you can download Windows Resource Kit from Microsoft and copy the Robocopy file to "System32" folder.
On my local machine, I created a shared folder and created a batch file with this script.

in the example you will see "02-hs-film-01" - Computer name(local machine)
/s /e these are switches
Please go here for additional info - http://en.wikipedia.org/wiki/Robocopy

You may need to use net use this is username and password on local machine sharing the folder.
Copy and paste below:

net use \\02-hs-film-01\period1\Downloads /u:period1 film
robocopy \\02-hs-film-01\Period1\Downloads "C:\Documents and Settings\Film Server 1\My Documents" /s /e

This discussion is closed to new replies.