Using a Windows DOS batch you can easily schedule daily or weekly backups on your computer. All you need is an archiving application like 7zip or winrar. In this post, I will show you how to create an automatic folder backup system using Winrar(r) & windows DOS batch.
1. First create a simple text file containing paths of the folders you would like to backup:
Save this file as
backuplist.txt to a folder preferably with a path without any spaces on it. Because most of the time spaces on your folder paths will cause problems on your batch scripts. I put it in a folder on my D drive like this:
The second step requires that you have installed Winrar on your computer. You can download WinRar here if you don’t have it already.
2. Open notepad or any basic text editor and type the following commands:
"C:\Program Files\WinRAR\rar.exe" a -ag D:\Backup\backup @
Don’t forget to change the archive path to your archive directory on your computer. In this example, I am archiving my files to
D:\Backup folder with a prefix of
backup. If you want to backup your files to
D:\Archives, you need to change it to something like
Save this file as “
backup.bat” in the same directory as “
3. The 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 set up 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.
Now your backup batch will run on the time you scheduled and it will backup the folders you listed in the “backuplist.txt” file.
I hope you liked this simple tip. Follow me to get more tips like this. Enjoy!