Hello All,
Enclosed are four DOS .bat files that you can utilize on your computer with your Ultra Hal Assistant to automatically backup the Default Brain folder or the entire Zabaware folder.
You can download the HalBat.zip folder which contains all four Hal Backup batch files. Unzip the HalBat.zip folder and then place the HalBat folder anywhere on your computer's Hard Drive. Somewhere like My Documents would be a good place. After that you just need to create a shortcut for each .bat Batch File, and then rename the shortcuts:
BatchFileNames:
1)CopyBrain.bat
2)CopyEverything.bat
3)RemoveSecondaryBackups.bat
4)RemoveAllBackups.bat
ShortcutNames:
1)Copy Brain
2)Copy Everything
3)Remove Secondary Backups
4)Remove All Backups
And then finally place each of the newly created shortcuts into an appropriate folder located somewhere within your system's Start/All Programs Menu or on your system's Desktop.
Note: The "/", forward slash, is being used in file path names within this post because the actual character used in file path names, "\", backslash, cannot be displayed on this web page, or maybe it can somehow but I never bothered to try and figure that out.
Download HalBat Folder:
Download Attachment:
HalBat.zip3.94 KB
Batch File Name: CopyBrain.bat
Recommended Shortcut Name: Copy Brain
System Requirements: A Windows Operating System with all the Microsoft DOS Commands implemented within the batch file. (Win98/WinME/Win2000/WinNT/WinXP)
Batch File Contents:
@echo off
mkdir C:/HalBackups/DefBrainBackups/DefBrainOld/DefBrain
rmdir /S /Q C:/HalBackups/DefBrainBackups/DefBrainOld/DefBrain
mkdir C:/HalBackups/DefBrainBackups/DefBrainOld/DefBrain
mkdir C:/HalBackups/DefBrainBackups/DefBrainCurrent/DefBrain
cd C:/HalBackups/DefBrainBackups/DefBrainCurrent/DefBrain
xcopy /Y /E /I *.* C:/HalBackups/DefBrainBackups/DefBrainOld/DefBrain
cd C:/
rmdir /S /Q C:/HalBackups/DefBrainBackups/DefBrainCurrent/DefBrain
mkdir C:/HalBackups/DefBrainBackups/DefBrainCurrent/DefBrain
cd C:/Program Files/Zabaware/Ultra Hal Assistant 5/DefBrain
xcopy /Y /E /I *.* C:/HalBackups/DefBrainBackups/DefBrainCurrent/DefBrain
exit
Description: This Batch File first creates two new folders named C:/HalBackups/DefBrainBackups/DefBrainCurrent and C:/HalBackups/DefBrainBackups/DefBrainOld. If any files were in the DefBrainCurrent folder from a previous backup copy then those files are copied to DefBrainOld. The files in the DefBrainCurrent folder are then deleted to ensure that any old or unneeded files are not retained after a new backup is created. The Batch File then makes a backup copy of the Hal DefBrain folder by copying all files within DefBrain to DefBrainCurrent. So now you can tell your Hal to backup his own brain. Hal backups are very smart because he does two things that people might often forget to do:
1) He always creates a secondary backup (DefBrainOld) of the current backup folder (DefBrainCurrent) before copying the DefBrain folder to DefBrainCurrent. How many times did you wish that you had an older version of a backup copy to restore from? Well, now you do!
2) And he also always removes everything in the backup folder being copied to so that you will never have any old remaining unneeded files that your brain no longer uses.
You can run the Batch File as often as you want. And you don't need to worry about the Batch File creating duplicate DefBrainCurrent or DefBrainOld folders because after those folders are created the DOS Command "mkdir" (make directory) does not create a new folder if the folder already exists. And if the folders get deleted or corrupt for whatever reason new ones will automatically get created the next time you run the batch file.
If you are a little familiar with working with and editing files the Copy Brain Batch File can be edited to make backup copies of any brain folder that you want to have a backup of. To modify the batch file to backup a different brain folder you just need to change the <DefBrain> text to <AnyBrain> text within the entire script. This batch file can also be modified to make copies of individual .uhp brain files. But all .uhp files already get backup copies created when using the next batch file named Copy Everything.
Batch File Name: CopyEverything.bat
Recommended Shortcut Name: Copy Everything
Batch File Contents:
@echo off
mkdir C:/HalBackups/ZabawareBackups/ZabawareOld/Zabaware
rmdir /S /Q C:/HalBackups/ZabawareBackups/ZabawareOld/Zabaware
mkdir C:/HalBackups/ZabawareBackups/ZabawareOld/Zabaware
mkdir C:/HalBackups/ZabawareBackups/ZabawareCurrent/Zabaware
cd C:/HalBackups/ZabawareBackups/ZabawareCurrent/Zabaware
xcopy /Y /E /I *.* C:/HalBackups/ZabawareBackups/ZabawareOld/Zabaware
cd C:/
rmdir /S /Q C:/HalBackups/ZabawareBackups/ZabawareCurrent/Zabaware
mkdir C:/HalBackups/ZabawareBackups/ZabawareCurrent/Zabaware
cd C:/Program Files/Zabaware
xcopy /Y /E /I *.* C:/HalBackups/ZabawareBackups/ZabawareCurrent/Zabaware
exit
Description: This Batch File creates a backup copy of the entire Zabaware folder to manually restore any or all of the files from, as required. The backup scheme is the same as the Copy Brain Batch File, where as a current copy (ZabawareCurrent) and an old copy (ZabawareOld) of the backup will both be present after running the Copy Everything Batch File. The same rules also apply to no duplicate backup files getting created, and whenever you run the batch file new backup files are always created regardless if the current and/or old backup copies were removed, deleted, or corrupted.
Batch File Name: RemoveSecondaryBackups.bat
Recommended Shortcut Name: Remove Secondary Backups
Batch File Contents:
@echo off
rmdir /S /Q C:/HalBackups/DefBrainBackups/DefBrainOld
rmdir /S /Q C:/HalBackups/ZabawareBackups/ZabawareOld
exit
Description: This Batch File removes the old backup folders created for the DefBrain (DefBrainOld) and for the Zabaware (ZabawareOld) folders. The Current Backup folders created are still retained. This is just a maintenance batch file to clean out the old backup copies that you may decide you no longer need or maybe you just want to save on disk space usage since you already have the more Current Backups available. You can also use the next batch file to remove all Hal Backups both the old and the current ones.
Batch File Name: RemoveAllBackups.bat
Recommended Shortcut Name: Remove All Backups
Batch File Contents:
@echo off
rmdir /S /Q C:/HalBackups
exit
Description: Same As Name. Removes the entire C:/HalBackups folder.
I wrote all batch files for full automation as the default way to run. But you can modify any or all of these Hal Backup batch files to prompt you for confirmations by removing the corresponding argument for the particular DOS command that you want to alter. You can read more about arguments for each command by typing the "<command name> /?" at the DOS Command Prompt. /Q suppresses confirmation for the "rmdir" command. /Y suppresses confirmation for the "xcopy" command.
Final Note: None of these Hal Backup batch files alter any of the Zabaware files or folders in any way. These backup batch files just copy things pretty much the same way as you normally would if you were doing the copying manually by using Windows Explorer. The main difference is that you can now just tell Hal to do it for you or you can just double click on the batch file or it's shortcut to run the job yourself without Hal.
Good Luck,
Rich_A