/ Published in: DOS Batch
Expand |
Embed | Plain Text
@ECHO OFF CLS GOTO skipcomment REM its been awhile since i wrote VB or BAT files REM automate.vbs calls this file (i read it was a good way to have the backup run silently ) REM %3 is the path to repozo (shouldnt change...) :skipcomment REM Note:these are TEMP var's, there contents change often SET return=empty SET /a count=0 SET testing=False SET debugLine2=I-------------------------------------------------------------------------------------------------------------------I SET debugLine3=I-------------------------------------------------------------------------------------------------------------------I SET debugLine4=I-------------------------------------------------------------------------------------------------------------------I SET debugEmpty=I-------------------------------------------------------------------------------------------------------------------I SET debugEnd=L-------------------------------------------------------------------------------------------------------------------J REM check Root folder REM Log data passed by the VB script (automate.vbs) GOTO logParams :logParamsEnd SET debug=debug1 GOTO debug :debug1 SET return=roboFolderLog GOTO doesFolderExists :roboFolderLog SET return=roboFolder GOTO doesFolderExists :roboFolder REM .this Script location REM DEBUG SET debugLine2="Call repozo with B backup, v verbose, z compressed, --r Backup Location, --f File Location" SET debug=debug2 GOTO debug :debug2 REM DEBUG END REM LOG REM LOG REM LOG REM Backup folder REM DEBUG SET debug=debug3 GOTO debug :debug3 REM DEBUG END REM w= wait 20sec before trying again or moving on REM dcopy= keep origonal timestamp REM v= show data (verbose) REM np= No Progress bar REM log= output data to the log file REM XF= exclude file REM m= only backup changed files. REM DEBUG SET debugLine3="ROBOCOPY %1%2 %4\roboBackup\data /E /R:3 /W:20 /DCOPY:T /XF Data.fs /A /V /NP /LOG:%4\log\%roboLogName%.log" SET debug=debug4 GOTO debug :debug4 REM DEBUG END ROBOCOPY %1%2 %4\roboBackup\data /E /R:3 /W:20 /DCOPY:T /XF Data.fs /A /V /NP /LOG:%4\log\%roboLogName%.log GOTO skip :quickpass ROBOCOPY %1%2 %4\roboBackup\data /E /R:1 /W:0 /DCOPY:T /V /XF Data.fs /A /NP /LOG:%4\log\%roboLogName%.log :skip REM DEBUG SET debugLine2= All Done! SET debug=debug6 GOTO debug :debug6 REM DEBUG END REM LOG GOTO end REM ---------------------------------------------- REM J's fun_ctions REM ---------------------------------------------- REM Check Folder exists :doesFolderExists GOTO %return% REM ---------------------------------------------- REM CREATE FOLDER :createFolder GOTO %return% REM ---------------------------------------------- REM DEBUG :debug REM put this in the log file REM VV VV VV VV VV VV VV VV VV VV SET debugLine1=r----------------------------------------- NOTE: %count% At: %Time% -----------------------------------------------, REM VV VV VV VV VV VV VV VV VV VV VV VV VVV REM DEBUG MODE: Put this on the screen VV REM VV VV VV VV VV VV VV VV VV VV VV VV VVV CLS ECHO. ECHO. ECHO. ) REM ^ ^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ REM ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^ REM ^ ^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ ^^ ^^^ REM clear data GOTO %debug% REM ---------------------------------------------- REM GET OUT OF MY HEAD(er)!!!! REM ---------------------------------------------- REM Note: Not a fucntion. :logParams ECHO. Log file path : %mkfolder% >>%logFolder% ECHO.Drive Letter / Location : %1 >>%logFolder% ECHO. Site : %2 >>%logFolder% ECHO. Path to REPOZE : %1%2%3 >>%logFolder% ECHO. Backup Folder Path : %4 >>%logFolder% GOTO logParamsEnd REM ---------------------------------------------- REM end fun_ctions REM ---------------------------------------------- :end
You need to login to post a comment.
