TechiWarehouse.Com


Top 3 Products & Services

1.
2.
3.


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/santanaservices/public_html/techiwarehouse.com/cms/engine.php on line 37

Dated: Mar. 21, 2005

Related Categories

DOS
Windows 2000
Windows 98
Windows NT
Windows XP

This is a tutorial to create a simple yet very handy utility with a batch file to back up files from many different parts of your computer and even your registry.

First let's take a look at the code and then we'll explain each part.

MD %homedrive%\BackUPS\Address_Book\
COPY /y %homedrive%\Progra~1\Outloo~1\WAB.exe %homedrive%\BackUPS\Address_Book\

CD %homedrive%\%homepath%\LOCALS~1\APPLIC~1\IDENTI~1\{00000000-0000-0000-0000-000000000000}\MICROS~1\OUTLOO~1\
MD %homedrive%\BackUPS\OEMails\
COPY * %homedrive%\BackUPS\OEMails\

CD %homedrive%\%homepath%\FAVORI~1\
MD %homedrive%\BackUPS\Favs\
XCOPY /s/v/i/q/h/r/y/d * %homedrive%\BackUPS\Favs\

MD %homedrive%\BackUPS\OE_RegBackup\
REGEDIT /e %homedrive%\BackUPS\OE_RegBackup\OE_Acc.reg "HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts"

CD %homedrive%\%homepath%\MYDOCU~1\
MD %homedrive%\BackUPS\MyDocs\
XCOPY /s/v/i/q/h/r/y/d * %homedrive%\BackUPS\MyDocs\

Let's talk about what the code is doing at the moment and then we'll go into what each part does individually.

There are 5 things that this script is backing up meaning basically copying from one place and pasting it in the other.

Every programmer, or scripting person has thewier own way of working so in this case you'll see mine. It may not be the most efficient way of putting this code down but it makes it easy for me to understand the way I have it here. Once you the readers understand how and what is happening you may want to reduce this code and still make it work perfectly.

Address Book:Practical Batch Tutorial

First we have MD %homedrive%\BackUPS\Address_Book\. This means you are commanding your computer to "Make Directory" in your boot drive which is "C:\" in most cases. And then it'll create a "BackUPS" directory and "Address_Book" directory inside that. By now, you must have realized that I'm trying to back up my Windows Address Book. Notice how %homedrive% is used as a substitute for "C:\".

Next we used COPY /y %homedrive%\Progra~1\Outloo~1\WAB.exe %homedrive%\BackUPS\Address_Book\. Let me warn you, this is not the optimum way to putting this command down. But it will help you tweak it correctly for optimum efficiency. What this command is doing is that it's copying a "WAB.exe" file from Outlook folder inside Program Files Folder and pasting it in this new backup folder we created. Notice how "/y" is used after COPY. This is called a modifier and helps to suppress prompting to confirm you want to overwrite an existing destination file.

  Page 1 of 3
  First | Previous | Next | Last

Now that you've gotten free know-how on this topic, try to grow your skills even faster with online video training. Then finally, put these skills to the test and make a name for yourself by offering these skills to others by becoming a freelancer. There are literally 2000+ new projects that are posted every single freakin' day, no lie!


Previous Article

Next Article




Facebook