How to schedule a recurring backup of a Windows XP folder to a Network share drive


I have worked on computer backup products for more than 20 years and I still find most of them to be complicated to set up and use. They sometimes include so many features and options that people just give up in despair while trying to configure them.

If you have a network share drive and want to make periodic backups to it, you can do it without purchasing any new software and without having to resort to using Microsoft’s built-in backup utility which stores backups in a proprietary file format. This approach requires a special restore program to examine them or to copy them back to your PC. The fact that Microsoft’s backup utility is so well hidden speaks volumes for their confidence in customers being able to successfully find and use it.

If all you want to do is schedule a simple automated backup of a folder, I will explain an easy 3-step process to set up a recurring backup on Windows XP. I haven’t investigated an equivalent procedure for Windows Vista or Win7, but I assume this technique would work there as well since those operating systems also have similar built-in capabilities.

Step 1: Map the network share to a drive letter.

The first step is to set up the network drive as a drive letter on your PC. To do that, just open up Windows Explorer, basically any folder, and under the Tools menu, select “Map Network Drive”. Your network drive will likely have a name such as “server” and a share that you wish to use such as “backup”. In the dialog box that pops up, you can just type in \\server\backup. XP will let you use the ‘Browse’ feature to find your network drive and share if you don’t happen to know them by name. Once located, you can assign it an available drive letter. Make sure to check the box for your PC to reconnect to it at logon.

Step 2: Create a simple xcopy command in a batch file.

Let’s say the first step gave your network drive the letter X:.

We will now create a simple batch file called backup.bat in Notepad with the following single line that looks like this example:

xcopy "c:\Documents and Settings\Lee\My Documents\SWfiles\*.*" x:\Backup\SWfiles /d /e /y

(that should all be on a single line, but it got wrapped here)

This is the DOS xcopy command which is built into XP. It works like this:

xcopy "source files" "destination folder" /options.

I’ve selected the source files as “c:\Documents and Settings\Lee\My Documents\SWfiles\*.*”. That will back up every file and folder under the folder called SWfiles. I had to put quotes around it because some of the folder names have spaces in them. If you have spaces in any of the folder names, you will need these quotes around the source and/or destination name.

The purpose of the options is as follows:

/d – This option only backs up the file if the source file is newer than the destination file that may already exist. This allows the backup to avoid unnecessary writing if the file hasn’t changed since the last backup.

/e – This option makes the xcopy command search in sub-folders so you back those up files too.

/y – This is to avoid having the job ask for your permission to overwrite existing files.

Let’s save this file as backup.bat in any convenient folder. I put mine in My Documents.

Test it by double clicking on it to confirm it backs up the folder to your network share.

Step 3: Set up a scheduled task to run the batch file.

To open Scheduled Tasks, click Start, click All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.

Double-click Add Scheduled Task to start the Scheduled Task Wizard, and then click Next in the first dialog box. Just follow the wizard to select the backup.bat file and don’t worry if you can’t find the proper options to select, the task is very easy to edit once it’s finished. Unless you select, ‘run only when logged on’, you will have to select a user/password to run this task so if you don’t already have a password set for yourself, you will need to set one up. I set up a My Documents backup to run once a day, but for my SWfiles folder, I wanted it to back it up once an hour. If at first you don’t get it right, you can edit the task by double-clicking on it. Then you can select ‘Advanced’ options to set it up to run it every hour. Set the duration to 24 hours so it will run every hour of the day.

Here’s an example of what the Scheduled Tasks screen looks like:

The Task Scheduler for Windows XP

The Task Scheduler for Windows XP, Click for larger image.

Please keep in mind that if you do this on a laptop, the backups will only happen when you’re connected to your network, so if you’re off traveling with your laptop, make sure you use another backup method (perhaps a Picture Keeper customized to backup all of your favorite file types).

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge