Tuesday, January 25, 2011
Batch File to Retrieve Batch Files from Network Drive and Pack Them
Here is a useful script that administrators can use to retrieve automatically files from the network drive and pack them immediately after that. All the actions are being logged to the LOG file called by default 1.log. You can easily modify this script with help of Dr.Batcher, a powerful utility designed to create and modify batch files.
@echo Starting>> 1.log
@Echo off
@DATE /t >> 1.log
@TIME /T >> 1.log
@echo Copying and logging results ...
@xcopy v:\post\*.doc /z /c /Q >> 1.log
@echo Packing... >> 1.log
@rar a -ag + YYYY:MM:DD:HH:MM \*.doc >> 1.log
@echo Moving the archive to TEMP folder... >> 1.log
@move *.rar TEMP
@echo Removing DOC... >> 1.log
@del /F d:\*.doc
@echo Done... >> 1.log
Have any suggestions on this batch file? Leave your comments!
Labels:
batch files,
network,
scripts,
solutions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment