How to CREATE A BATCH FILE TO TAKE DAILY BACKUP

Daily backup for a selected folder or file...

this batch file wil create a new folder with curent date automaticaly....

how to create a batch file...
1. open a notepad file
2. copy the entir contnt which 1 i hd givn below
3. save the file with extensn (.bat) ex..(new backup.bat)

@echo off
:: variables
set drive= E:\DAILY BACKUPS\MY DATA
set folder=%date:~0,2%-%date:~3,2%-%date:~6,4%
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y

echo ######## PLEASE WAIT SYSTEM BACKINGUP SOME DATA########...
%backupcmd% "E:\calseadata" "%drive%\%FOLDER%"

echo !!!!!!!!BACKUP COMPLETED THANKS!!!!!!!!
@pause


1. RED color for (which folder u want to take backup)
2. GREEN color for (where u want to save the backup)

0 comments:

Post a Comment