Creating a Backup Batch File

Backing up your computer data should be done often by everyone with a computer. A hard drive can go out at any time without much warning. It can be tough to remember to constantly backup your files though. Luckily, with the newer versions of Windows, you can setup a backup schedule. However, at times, the Windows backup utility can feel limiting. Due to this or other reasons, you may not want to use the Windows backup scheduler. In these cases, you can create a computer backup batch file.

 

Quick Tip: Try Mozy Online Automatic Backup: 2GB Free

Create a Batch file backup with XCopy

This is a somewhat advanced method that allows for a lot of control when backing up files. First, you can open up notepad and then save the file as a “.bat” file to make it an executable batch file. In the batch file, you can use XCopy to copy certain directories to other locations such as another hard drive, a network drive, or even a flash drive. Now, let’s look at how to use XCopy. Take the following example:

xcopy /e /v /y c:\Music e:\Backup\Music

This will copy my c:\music to location e:\backup\music. For me, E Drive is my external hard drive. However, you can set this to any drive you see in the “My Computer” window. The /e parameter makes sure XCopy copies sub-directories. The /y parameter makes it so your are not prompted to verify an overwrite. The /v just makes it so the computer verifies the copy. I suggest using all 3 of these parameters.

backup-batch-file

Scheduling Your Backup Batch File

After you have your batch file completed, you can make it a scheduled task. In newer versions of Windows, just type “task scheduler” into the search bar. In older versions of Windows, you can schedule a task by going to Control Panel->Performance and Maintenance->Scheduled Tasks. Follow the wizard to schedule your batch file to run daily (or how ever often you want it to run).

(Don't worry, we won't spam you)