patrickm3
asked on
batch file question
I need to have two drives with the exact same files on them. Is there a way that a simple batch file can be written so that new files on one drive will be copied to another on a daily basis?
patrick
patrick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you are running windows 98, you can schedule the batch file, in the scheduler, of course.
To get a list of files,
go to the root directory you want to start at, then type
dir /b/s > mybatch.bat
this will write the files, including path, to the bat file. Then all you have to
do is edit the batch file to create copy statements.
To get a list of files,
go to the root directory you want to start at, then type
dir /b/s > mybatch.bat
this will write the files, including path, to the bat file. Then all you have to
do is edit the batch file to create copy statements.
In addition, on to the original answer I gave you, the xcopy command has a "D" option that will cause it to only copy the files with a newer timestamp on the source drive to the target drive.
ASKER