Thursday, November 12, 2015

Simple backup batch(using rar/winrar) - for Windows

Here is a simple backup batch file fow windows.
It will be called by a daily process and it provides to make a .rar backup file with day specification in the file name.
Here is the content of the .bat file that you have to create(suppose you have f:\DATI\ANAGRAFICA folder to backup):

echo

set WINRAR="C:\Program Files (x86)\WinRAR"

set mydate=%date:~6,4%%date:~3,2%%date:~0,2%
echo %mydate%

f:
cd DATI
%WINRAR%\rar a -r F:\BACKUP\ANAGRAFICA_%mydate%_BCK.rar ANAGRAFICA



That's all..... Bye...

No comments:

Post a Comment