Discussion Locked

writing batch files ?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
can anyone suggest the content for a batch file to copy the contents of a partition to another partition within windows 98 also the switch's required to setup a daily backup to copy only the modified data ?

2 replies

by bill_w

Give this a try (I assume that the first partition is the C: drive, and the second the D: drive):

File one - to copy the whole lot.
@echo off
cls
xcopy c:\*.* d:\ /h /e /c /r /k /v

[flags for xcopy will copy hidden files, all folders, continue if error (otherwise it will fail on open files), copy over read-only, copy attribs, and verify files]

File two:
@echo off
cls
xcopy c:\*.* d:\ /h /e /c /r /k /v /m

[the extra /m flag will only copy the files changed since last time, and will reset the archive flag. You can use the /d flag instead, which will only copy newer files over the top].

However, these will copy files and folders - they won't copy open files - like the swap files, etc, and will not make an image of the partition - for that you need a copy of Ghost. Also you will need to run them manually or use a scheduler like WINAT, but that's another discussion.

You can use xcopy /? |more to get more help on xcopy, from a dos shell.

Let us know how you get on.

Bill

by davisr65

I use robocopy to backup data ....and to do incremental after the data is backed up..it is a NT 4.0 resource kit utility, comes with a detailed help file on switches

This discussion is closed to new replies.