As mentioned in my earlier post – Backup Story Part 3 –  I use Sync.jar to synchronize my directories and files.

For easy use of Sync.jar, I have put together some scripts, as given below.

@echo off
set NAME=abc
del zip\%NAME%.zip > nul
call sync-generic.bat %NAME% d:\%NAME% .\%NAME%
call zip.bat %NAME% .\%NAME%

@echo off
set SYNC_HOME=./Sync.jar
rem deleting existing log file
del log\%1.log
rem java -jar Sync.jar -l –force %2 %3
java -jar Sync.jar –exclude:”.svn” –log:log/%1.log –force %2 %3
echo Backup for %1 done.

@echo off
set ZIP_HOME=c:/program files/7-zip
set OUT_DIR=./zip
del %OUT_DIR%/%1.zip
“%ZIP_HOME%/7z” -r a %OUT_DIR%/%1.zip %2
echo Zip for %2 done.