In Reader to Reader, March 2001, InstantDoc ID 19831, Stephen Kiss provided the Backup.vbs script, which automates backups by running the Windows NT Server 4.0 NTBackup utility. However, Backup.vbs doesn't work on Windows 2000 and later. Inspired by Backup.vbs, I created the BackXP.vbs script, which you run from a command line and which automates a daily backup of a Windows XP client to a tape drive by executing the ntbackup.exe and rsm.exe Windows utilities. I also created the DFSRootBackup.vbs script, which uses the Dfscmd utility (dfscmd.exe) to produce a batch script that restores your Dfs roots. These two examples demonstrate how you can use scripting and Windows Script Host (WSH) to enhance your control over built-in and third-party Windows utilities.
Preliminaries
To use BackXP.vbs, you need to perform two preliminary tasks. First, you must create a backup selection script (.bks) file, which contains a list of folders and files that you want to back up. The .bks file is simply a text file that stores directory paths to back up, one line at a time. For example, if you want to back up the entire contents of drives C, D, and F, your .bks file should contain the following lines:
C:
D:
F:
If you want to back up only certain directories, the .bks file will look something like this: . . .