This
isn't an
incremental backup (the kind where you update an archive with files
that have changed since the last backup). My way, files get
backed up, whether they've changed or not. Someone had emailed to
ask how to use wzzip to update an archive with files that had been
added or changed since the last time. I sent back an example
which I put into a
text file in case someone else might get use out of it.
I started with the
WinZip Command Line Support Add-on.
You have to have
WinZip installed first, for the Add-on to install as
well. Then, just for my own convenience, I copied
wzzip.exe to a directory (folder) named
C:\DOS. This isn't a must... you can have the file wherever you like, as long as you know its exact location (
path), which is needed for the batch file to work.
C:\DOS keeps the path short and simple for my purposes.
I used to use PKZIP 2.5 for DOS for backing up files in Windows 98, but
in Windows XP, the program displayed an incurable case of the stupids
when handling long directory names. WinZip did much better.
It even worked with PKZIP's switches, so no changes were needed
there. To see wzzip's command options, install the add-on, then type
wzzip /? from the
Start Menu / Run... box and press
ENTER. At the end of the second block of help text, there should be a link that says "WZZIP reference". Click that.
I make WinZip create the archive (a zip file) in a directory called
D:\TEMP. Like my choice of
C:\DOS,
this is a matter of preference. You can choose any drive/directory you
like, or make your own and give it whatever name you want. I
chose
D:\TEMP
out of habit. It's a short name, not buried somewhere in a subdirectory,
and it's a place I like to store lots of things until I delete or move
them elsewhere.
Once the archive is done, I tell the batch file to move it from
D:\TEMP to the "staging area" folder (default is
"%userprofile%\Local Settings\Application Data\Microsoft\CD Burning". I chose a different folder called
"D:\CD Burning" for the staging area.
<Note: The easiest and fastest way to change the
default locations of XP's "special folders" including the CD burning
staging area, download TweakUI, one of the Microsoft PowerToys for Windows XP, install it, type tweakui from the Start Menu / Run... box, press ENTER, expand the My Computer tab on the left by clicking the + sign, then choose Special Folders. To the right, you'll see a drop-down list box and a Change Location button.>
From here, the archive is manually burned to a rewritable CD. When I'm ready to do that, I plunk in a CDRW disk,
right-click the drive letter for the CD burner, and choose
Write these files to CD. This is one part of the process that I wish were automatic.
More about burning CDs in Windows XP:
- (Windows 5 Support
Center) Burning CDs in Windows XP
- (Microsoft) CD Burning Becomes Routine
@ECHO OFF
:: this line silences most commands (minus their output)
:: which would otherwise be displayed on screen
@echo Give the backup a name and press ENTER...
set /p name=
:: these lines name the archive...
:: I usually use today's date
ECHO.
:: this line merely creates a blank line
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A C:\BAT\*.* > nul
:: this line adds my batch folder and its files to the archive.
:: The
> nul part keeps the command from spilling too much
:: output onto the
screen... you might prefer to leave it out
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A C:\DOS\*.* > nul
:: this line adds my DOS folder and its files
:: to the archive... There has always been a folder
:: named C:\DOS on my HD, no matter the OS
:: I like to keep a few command based tools here
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "%userprofile%\Favorites\*.*" > nul
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "%userprofile%\My Documents\*.*" > nul
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "%userprofile%\Desktop\*.*" > nul
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "%userprofile%\Local Settings\*.*" > nul
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "%userprofile%\Start Menu\*.*" > nul
:: these lines add various folders in the current user profile
:: to the archive... You may have many profiles, depending
:: on the number of user accounts that have been set up.
:: Therefore you may also have many sets of Favorites, My Documents etc.
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "C:\WINDOWS\system32\drivers\etc\hosts" > nul
:: this line adds the
hosts file
:: to the archive... I use a
hosts file
:: to block some banner ads and other undesirables
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "c:\program files\*.INI" > nul
:: this line adds initialization files
:: (the ones stored in
C:\Program Files)
:: to the archive
:: There are other INI files on the system
:: but these are the ones I like to keep;
:: many of them can save a few headaches
:: later if a program reinstall comes up.
:: WS_FTP is one example of this;
:: instead of redoing all my preferences,
:: I put the custom INI file back into WS's main folder
:: after a reinstall. Saves a lot of trouble.
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "C:\Program Files\keynote\*.knt" > nul
:: this line adds my
Keynote database file
:: to the archive
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A "c:\program files\opera\*.adr" > nul
:: this line adds a few Opera preference files to the archive--
:: bookmarks, notes etc
"C:\Program Files\erunt\erunt.exe" d:\erdnt sysreg curuser otherusers /noconfirmdelete /noprogresswindow
:; this line backs up up the XP
Registry, using a tool called
ERUNT
C:\DOS\WZZIP -EX -P -R "d:\temp\%name%.zip" -A d:\erdnt\*.* > nul
:: this line adds the
Registry backup to the archive
rd /s /q d:\erdnt
:: this line removes
ERUNT's backup folder from the hard drive
move "d:\temp\%name%.zip" "d:\CD Burning" > nul
:: This line moves the finished archive to the "staging area"
echo.
echo Backup done!
echo Don't forget to burn the file to CD!
echo.
echo Press a key to exit.
echo.
pause>nul
@exit
I also have a version of the above lines in text form, called
backup.txt. It has fewer comments but it's essentially the same script.