metinsaylan // rogue developer

Batch: Backup folders using WinRAR

Using a DOS batch you can easily schedule daily or weekly backups on your computer. Here I will show you how to create an automatic folder backup system using Winrar(r) & DOS batch.


First create a simple text file containing paths of the folders you would like to backup:

D:\musicfolder
D:\myfoldersubfolder
D:\this-isanothersubfolder

Save this file as backup.txt

The second step requires that you have installed Winrar on your computer. Open notepad and type the following:

"C:\Program Files\WinRAR\rar.exe" a -ag F:\archive\archive @backup.txt -ms

Change archive path to your archive directory on your computer. I am archiving my files to F:\archive folder with a prefix of archive. If you want to backup to D:\backup, you need to change it to something like D:\backup\my\files. Save this file as “backup.bat” in the same directory as “backup.txt”.

Third step requires that you have administrator privileges to create Scheduled Tasks. Go to Control Panel > Scheduled Tasks > Add Scheduled Task. Click Next to select the batch file. Click Browse and find the batch you just created. Now select Backup.bat and click Open. Click daily, weekly or anything you prefer and click Next. Click Next to setup time and repeating interval. Then click Next and it will ask you admin username and password twice. Enter your username and password and click Next. Click Finish.

That’s all.

Now your backup batch will run on the time you scheduled and it will backup the folders you listed in the “backup.txt” file. What’s more is it will be compressed using advanced rar technology.

Search Batch: Backup folders using WinRAR on Google