Batch File to Copy Dirs to zip file with date
Posted on 2006-07-15
Exactly what I am trying to do:
1. I have 2 directories that need to be backed up.
2. I need to get these folders, subfolders, and files to a server for nightly backup.
What I have done already:
1. I have already manually copied the folder/files to he server.
2. I have written a batch file (very basic), using xcopy, that copies only the files that have updated in 2 directories.
What I would "like" to do:
1. I would like to add to the batch file a way to write the files that were copied to a log.
2. I an also going to add this batch file to scheduler to be run every night at 10pm.
2. If there is a more "correct" way, please suggest!
Some things that have crossed my mind while writing this:
1. Maybe zipping up these directories to a file with the "date" in the file name? But what about logging?
2. Maybe creating new directories on the server with the "end of day date" for the directory?
If anyone has suggestions, a better way, or whatever....any input would be greatly appreciated!