Thursday, December 10, 2009

XP Backup Utility from Connected Solutions

Sometimes simplicity is the order of the day. We’ve all seen complex backup solutions for use in Windows. They can be expensive, cumbersome, and time consuming to setup. And then there’s Microsoft’s answer, the “Backup Utility”. This disaster has, in the past, left users scratching their heads for more reasons than one. Not only is the built-in Windows Backup Utility a pain to use, it’s format has changed from one version of Windows to the next, making it difficult for the average user to restore from a backup created using a previous version of Windows.

So you’re cheap and lazy, but realize you still need to backup some of your most valuable files. All that clutter you have on your desktop that you keep telling yourself to organize. Those pictures you’ve been meaning to make copies of before your next life-altering hard drive failure. And then there’s the stuff you never think about until you don’t have it. When’s the last time you backed up your Internet Explorer favorites? Yeah, that’s what I thought. We’re all guilty of putting these things off. So what should you do about it? Connected Solutions to the rescue!

With a little help from Simon Sheppard’s website ( we’ve developed a simple backup solution. This is nothing more than a batch file which will prompt you for the drive letter of your backup device and then make copies (uncompressed) of “My Documents”, “Favorites”, and “Desktop” of the current user to that backup device. USB Thumb drive? No problem. Firewire external hard drive? No problem. Network storage device? No problem. Anything that has a drive letter will work (assuming sufficient storage space is available on the target device.) This utility will create a folder on the target drive called “Backup”. Within that folder it will create a subfolder for each backup event and name the individual folders based on date, time, and username. For example, “2009-11-20-0946-BillyBob.Jones” (without the quotes) would be the name of the folder created when BillyBob Jones’ backup ran on November 20th 2009 at 9:46AM. Pretty simple, huh?

Currently this is only available for Windows XP (and it may work on Windows 2000, too, but we haven’t tested it). In the near future we plan to create a version for use with Vista and Windows 7.

REM Backup utility developed by Connected Solutions ( 11/04/2009

@echo off
echo This backup utility will make a copy of the following folders on the backup drive of your choice:
echo My Documents
echo Favorites
echo Desktop
echo Default location PST files (MS Outlook)
echo To ensure a successful backup all open programs must be closed now...
FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B
FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B

REM The following code was found on Simon Sheppard's website,
For /f "tokens=1-3 delims=1234567890 " %%a in ("%time%") Do set "delims=%%a%%b%%c"
For /f "tokens=1-4 delims=%delims%" %%G in ("%time%") Do (
Set _hh=%%G
Set _min=%%H
Set _ss=%%I
Set _ms=%%J
:: Strip any leading spaces
Set _hh=%_hh: =%

:: Ensure the hours have a leading zero
if 1%_hh% LSS 20 Set _hh=0%_hh%

Echo The time is: %_hh%:%_min%:%_ss%
ENDLOCAL&Set _time=%_hh%%_min%
REM End of code found on Simon Sheppard's website,

SET /P TargetDriveLetter=Enter the drive letter of your backup device:
SET date=%date:~10,4%_%date:~4,2%_%date:~7,2%_%_time%_%UserName%
md %TargetDriveLetter%:\Backup\%date%
xcopy "%UserProfile%\Desktop\*.*" "%TargetDriveLetter%:\Backup\%date%\Desktop\*.*" /e
xcopy "%UserProfile%\Favori~1\*.*" "%TargetDriveLetter%:\Backup\%date%\Favorites\*.*" /e
xcopy "%UserProfile%\MyDocu~1\*.*" "%TargetDriveLetter%:\Backup\%date%\My Documents\*.*" /e
xcopy "%UserProfile%\Application Data\Microsoft\Outlook\*.*" "%TargetDriveLetter%:\Backup\%date%\OutLook Files\*.*" /e
echo Your backup is complete
echo Your backup location is: %TargetDriveLetter%:\Backup\%date%
echo This utility developed by Connected Solutions (

Feel free to copy the code above into a batch file or just download a zipped one from here.
If you would like to modify this utility please leave all credits and comments in place. Hey, it's free, don't act like you have to steal it!

No comments:

Post a Comment