Introduction: Easy Automatic Backup Outlook and Other Files.

About: Always loved electronics. I like to reuse parts or componets and I Love to be part of the Instructable community.

We're all concert about losing data from the computer, so from time to time we do backups of the files we consider more important for us, but what always happen is that whenever the computer give you problem you go to check the backups you make what it seems 3 days ago, but there are from 3 months ago, so you end up losing pictures, music or even the Outlook data.

So it did happened to me not long ago, so I made a very simple ".bat" file that will do the backup of only the modified files (or new files) from a few directories every time I turn off my computer.

...and the good thing are...

-You are going to back up only the data that has been modified. (not need to copy files that you already have in the backup USB pen drive )

-You'll do it when turning off the computer.(you don't mind if it take a bit longer because after it's done, it'll turf off the computer for you)


Step 1: What to Backup

You need to think what you really need to backup. In this Instructable I'm going to show how to back up anything really, from any directory.

Lets say you're interested in backup the information you have in the Outlook, first thing to do is find in your computer were the Outlook stores that data.

In my computer (i'm using XP) is located in

C:\Documents and Settings\("your account name")\Local Settings\Application data\Microsoft\Outlook\

You can make sure that this is the files location if you open the Outlook then Right click on the root folder (probably Outlook Today), Properties, advanced, then look at the Filename box; this is the location of your files.


Although you don't need to back up all the files form that directory, I rather be on the safe side and do the whole directory.

Any other directory you want to backup? all you need to do is find the location on your computer.

Step 2: Prepare Your Pen Dirve

Insert your pen drive in your computer. Pay attention to the letter is given by your computer, for example F:


Now make the directories where the backup files are going to be store. And copy the files to that directory
I made a directory call Documents and inside that a subdirectory call Outlook.

Step 3: Make the .bat File.

Almost everybody that learned how to use the computer with MSDOS, know how to use .bat files. It's basically like insert the command in MSDOS, but you can set a few commands to run in order.

Don't worry if you don't know anything about MSDOS commands, I'll explain how to do it.

Open the notepad.

writhe this code..

@Echo off
echo Preparing to backup files
echo.
echo Coping modified Outlook files....
cd C:\Documents and Settings\("your account name")\Local Settings\Application data\Microsoft\Outlook\
xcopy *.* F:\Documents\Outlook /y /d /s
Shutdown -s -t 00

Let see what that'll do step by step.

@Echo off
This will remove unwanted messages, like you wont see the command itself, but the result of using it.( i hope it make sense)

echo Preparing to backup files
This just show a message on the screen. (you could write anything you like after echo)

echo.
This only create a space so it'll look more tidy.

cd C:\Documents and Settings\("your account name")\Local Settings\Application data\Microsoft\Outlook\
This is to get acces to the directory we will like to make the backups from.

xcopy *.* F:\Documents\Outlook /y /d /s
This will copy all the files that has been modified...

xcopy Command to copy files
*.* this means.. all files, any extension.
F:\Documents\Outlook the location on the pen drive where we want the files to be copied.
/y it will rewrite existing files without warning.
/d it will only copy those files that has been modified.
/s it will do the same with the subdirectories.

Shutdown -s -t 00
This will shutdown your computer

-t 00 time that will wait b4 shutdown ( i put 00 so it won't wait, but if you want it to wait 30 seconds just write -t 30)

Save the file as Shutdown.bat on the desktop.

Step 4: You're Done!

Well done! you're done. if you want to can add any other directory to the bat files just use the same codes

"cd" before the directory for access.
"xopy *.*" and the location were you want it to be copy to.

for example if you want to make a backup copy of the desktop...

echo Coping modified Desktop files....
cd C:\Documents and Settings\("your account name")\Desktop
xcopy *.* F:\Documents\Desktop/y /d /s

Know you need to make sure you have the usb pen drive connected to the computer before click on Shutdown.bat (I just keep one connected at all times)
And know you have to get use to click on the file Shutdown.bat on the desktop every time you want to turn off your computer.

I hope this is helpful for anybody, thanks for reading. I'll be happy to answer any questions.