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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch command to copy files to second hard drive and zip drive

Status
Not open for further replies.

jesp

Technical User
Jun 22, 2000
9
GB
I've set up a small peer to peer network (NT4 workstations) using one box with two hard drives as a central store for data. I'd like some advice about how to automatically back up data held on one of the drives to the other drive. In addition is there a way to do the same to a zip drive?

thanks
Jesp
 
Have you tried a batch file

XCOPY32 "C:\Network\Docs" /s "D:\" (/s Include Sub-Dirs)

Where D is your ZIP disk

Save this a batch file and run it from Task Scheduler

Alternatively, MS Backup (Not Reccommended) I think can be scheduled.

Best of Luck
 
Although you did not state it, I assume you want to do this on a regular basis.

I believe NT 4.0 Workstation load includes the AT command. This is similar to the UNIX CRON where you can schedule a job/batch/.cmd file which has all of your commands.

If you can manually do the backup, then write down the EXACT commands you are typing in. Then retype them in notepad and save the file with an extension of either .cmd or .bat (.bat is a hold over from DOS).

Example might be assuming you have set up links to the drives on the other PC's that you want to back up selected files..

Dual Drive PC, we will call MASTER. One of the peer to peer machines we will call USER1, and you have set up logon and password for the resources (drives) that you have shared and you have assigned a logical drive letter of M: to it. On MASTER you have a D:\> drive with a subdirectory of ARCHIVE

rem change local drive
d:
rem change to archive directory
cd\archive
rem copy files you want to backup
copy M:\SOURCE\*.*


save the above as a file, like: dailybak.cmd

Then after reading about AT, you can set it up to run once a month, week or day or any combination you can think about. Just assumes that MASTER and the USER1 is on when you intend to do the backup.

You can add variations... Include PKZIP ... There are scripts that I have found that using standard NT commands can create a unique file name based on date ..

Doug Cranston
poshdesk@gte.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top