Backup (Favs, OE Mail/Address Book, and My Documents dir) One Click!!
Backup (Favs, OE Mail/Address Book, and My Documents dir) One Click!!
For Windows XP
Here's my own way of backing up these important folders in XP.
It' was worth the five minutes to write it out.
Use Notepad to paste the following lines into, and save as backup.bat, or backup.cmd (or anything you like with either a .bat, or a .cmd extension.
Take note of the red y 's
Change all the red y 's to whatever drive letter you want to use for YOUR backups.
The batch file makes a folder named 'mybackup', and then makes 4 folders in there for each of the 'Favs, Docs, Contacts, and Emails.
Once you make the batch file, put it out of the way somewhere (the root of C:, or Program Files dir works well). Make a shortcut to it, and drop the shortcut in your quicklaunch.
Or if you like, schedule a task to run that batch every day.
Click the file manually, and watch it do it's thing. :)
@echo off
if exist y:\mybackup goto doit
md y:\MyBackup
md y:\mybackup\docs
md y:\mybackup\favs
md y:\mybackup\contacts
md y:\mybackup\oebackup
:doit
xcopy /s /e /h /y "%USERPROFILE%\My Documents" y:\mybackup\docs
xcopy /s /e /h /y "%USERPROFILE%\Favorites" y:\mybackup\favs
xcopy /s /e /h /y "%USERPROFILE%\Application Data\Microsoft\Address Book" y:\mybackup\contacts
xcopy /s /e /h /y "%USERPROFILE%\Local Settings\Application Data\Identities" y:\mybackup\oebackup
Here's my own way of backing up these important folders in XP.
It' was worth the five minutes to write it out.
Use Notepad to paste the following lines into, and save as backup.bat, or backup.cmd (or anything you like with either a .bat, or a .cmd extension.
Take note of the red y 's
Change all the red y 's to whatever drive letter you want to use for YOUR backups.
The batch file makes a folder named 'mybackup', and then makes 4 folders in there for each of the 'Favs, Docs, Contacts, and Emails.
Once you make the batch file, put it out of the way somewhere (the root of C:, or Program Files dir works well). Make a shortcut to it, and drop the shortcut in your quicklaunch.
Or if you like, schedule a task to run that batch every day.
Click the file manually, and watch it do it's thing. :)
@echo off
if exist y:\mybackup goto doit
md y:\MyBackup
md y:\mybackup\docs
md y:\mybackup\favs
md y:\mybackup\contacts
md y:\mybackup\oebackup
:doit
xcopy /s /e /h /y "%USERPROFILE%\My Documents" y:\mybackup\docs
xcopy /s /e /h /y "%USERPROFILE%\Favorites" y:\mybackup\favs
xcopy /s /e /h /y "%USERPROFILE%\Application Data\Microsoft\Address Book" y:\mybackup\contacts
xcopy /s /e /h /y "%USERPROFILE%\Local Settings\Application Data\Identities" y:\mybackup\oebackup
holy crap... thanks Norm! The answer to all my backup woes.
Thanks a million!
Thanks a million!
SG Theme SongThe Devil wrote:Tolerance is a virtue, not a requirement.
Just ran the BAT... Incredible.
You should make money with stuff like that.
You should make money with stuff like that.
SG Theme SongThe Devil wrote:Tolerance is a virtue, not a requirement.
- SeedOfChaos
- Posts: 8651
- Joined: Sat Apr 22, 2000 12:00 am
- Location: Comfortably Numb
Yeah, I have my email on D: to begin with, not my system partition C:. You can change the storage location of your email to whatever you want by going to Tools->Options, then go to the Maintenance tab and click on the "store location" button to pick a different folder. You may want to copy your existing folder files to that location first though. You can easily extract the files by using Norm's batch file. For the rest, your solution still rocks though Norm.
ex-WoW-addict
Experienced users know a few different ways to essentially do what the batch file does. I posted this for those who use the system defaults, and don't know where these files are actually kept on the drive. It's a one click, easy way to save everything to one folder.
How often have you seen someone post "how do I backup my emails?"
or "address book" ?
Not just Burke, many others as well.
How often have you seen someone post "how do I backup my emails?"
or "address book" ?
Not just Burke, many others as well.
- mountainman
- SG VIP
- Posts: 15451
- Joined: Tue Dec 26, 2000 12:00 am
- Location: Colorado
Yep, it works the same in 2K Ken.
I just rebooted into 2K and tried it to be sure.
Note: All files with the same name get overwritten on each execution.
@Mountainman
I'd love a job where I could sit here and make a living. If you have one, let me know
Otherwise, I've got work coming out my ying yang. A lot of it involves labor, and I'm getting tired of being sore everyday.
My fingers don't get sore
I just rebooted into 2K and tried it to be sure.
Note: All files with the same name get overwritten on each execution.
@Mountainman
I'd love a job where I could sit here and make a living. If you have one, let me know

Otherwise, I've got work coming out my ying yang. A lot of it involves labor, and I'm getting tired of being sore everyday.
My fingers don't get sore

Here's an updated 'clear your cache' batch file.
XP only (2K doesn't use the 'taskkill' command (gotta find another way, but I rarely use 2K now)
taskkill /im iexplore.exe /f
taskkill /im wmiprvse.exe /f
taskkill /im explorer.exe /f
taskkill /im msmsgs.exe /f
RD /S/q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /S/q "%USERPROFILE%\Cookies"
RD /S/q "%USERPROFILE%\Local Settings\History"
attrib -r -a -s -h "%USERPROFILE%\Recent" /s /d
del /f /s /q "%USERPROFILE%\Recent\*.*"
start explorer.exe
pause
Clears all cookies, IE history, IE temp files, and recent docs
Kills a few tasks that get in the way (files in use) then restarts explorer.
XP only (2K doesn't use the 'taskkill' command (gotta find another way, but I rarely use 2K now)
taskkill /im iexplore.exe /f
taskkill /im wmiprvse.exe /f
taskkill /im explorer.exe /f
taskkill /im msmsgs.exe /f
RD /S/q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /S/q "%USERPROFILE%\Cookies"
RD /S/q "%USERPROFILE%\Local Settings\History"
attrib -r -a -s -h "%USERPROFILE%\Recent" /s /d
del /f /s /q "%USERPROFILE%\Recent\*.*"
start explorer.exe
pause
Clears all cookies, IE history, IE temp files, and recent docs
Kills a few tasks that get in the way (files in use) then restarts explorer.
Norm wrote:Here's an updated 'clear your cache' batch file.
XP only (2K doesn't use the 'taskkill' command (gotta find another way, but I rarely use 2K now)
taskkill /im iexplore.exe /f
taskkill /im wmiprvse.exe /f
taskkill /im explorer.exe /f
taskkill /im msmsgs.exe /f
RD /S/q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /S/q "%USERPROFILE%\Cookies"
RD /S/q "%USERPROFILE%\Local Settings\History"
attrib -r -a -s -h "%USERPROFILE%\Recent" /s /d
del /f /s /q "%USERPROFILE%\Recent\*.*"
start explorer.exe
pause
Clears all cookies, IE history, IE temp files, and recent docs
Kills a few tasks that get in the way (files in use) then restarts explorer.
That worked great too! Thanks Norm.
I cannot believe that you haven't got 1000 replies and thank yous...
SG Theme SongThe Devil wrote:Tolerance is a virtue, not a requirement.
- mountainman
- SG VIP
- Posts: 15451
- Joined: Tue Dec 26, 2000 12:00 am
- Location: Colorado
Thanks Norm.Norm wrote:Here's an updated 'clear your cache' batch file.
XP only (2K doesn't use the 'taskkill' command (gotta find another way, but I rarely use 2K now)
taskkill /im iexplore.exe /f
taskkill /im wmiprvse.exe /f
taskkill /im explorer.exe /f
taskkill /im msmsgs.exe /f
RD /S/q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /S/q "%USERPROFILE%\Cookies"
RD /S/q "%USERPROFILE%\Local Settings\History"
attrib -r -a -s -h "%USERPROFILE%\Recent" /s /d
del /f /s /q "%USERPROFILE%\Recent\*.*"
start explorer.exe
pause
Clears all cookies, IE history, IE temp files, and recent docs
Kills a few tasks that get in the way (files in use) then restarts explorer.


You're welcome, everyone is welcome whether they reply or thank me or not.EvilAngel wrote:That worked great too! Thanks Norm.
I cannot believe that you haven't got 1000 replies and thank yous...
I got over the lack of thanks a while ago. I help for my own reasons. Thanks is what respectable people with manners give, others have thier own problems, and I can,t help with that, only love them, and forgive them for they know not what they do

Note: There will be times that the "clearcache" batch doesn't clear everything as planned. Some files stay in use, and are locked by other processes. Usually if you run the batch file again, it will clear everything the second time.
I think it's because there is not enough of a time delay between killing the processes, and clearing the files. Not sure.
I think it's because there is not enough of a time delay between killing the processes, and clearing the files. Not sure.
Norm wrote:Note: There will be times that the "clearcache" batch doesn't clear everything as planned. Some files stay in use, and are locked by other processes. Usually if you run the batch file again, it will clear everything the second time.
I think it's because there is not enough of a time delay between killing the processes, and clearing the files. Not sure.
Is it possible to remove the cookies command and have the bat still work effectivly?
I hate my cookies to be cleared sometimes. TIA
SG Theme SongThe Devil wrote:Tolerance is a virtue, not a requirement.
Norm wrote:No problem, just delete this line
RD /S/q "%USERPROFILE%\Cookies"
Awesome! If you had reps enabled I'd give ya one


SG Theme SongThe Devil wrote:Tolerance is a virtue, not a requirement.
Norm wrote:For Windows XP
Here's my own way of backing up these important folders in XP.
It' was worth the five minutes to write it out.
Use Notepad to paste the following lines into, and save as backup.bat, or backup.cmd (or anything you like with either a .bat, or a .cmd extension.
Take note of the red y 's
Change all the red y 's to whatever drive letter you want to use for YOUR backups.
The batch file makes a folder named 'mybackup', and then makes 4 folders in there for each of the 'Favs, Docs, Contacts, and Emails.
Once you make the batch file, put it out of the way somewhere (the root of C:, or Program Files dir works well). Make a shortcut to it, and drop the shortcut in your quicklaunch.
Or if you like, schedule a task to run that batch every day.
Click the file manually, and watch it do it's thing.
@echo off
if exist y:\mybackup goto doit
md y:\MyBackup
md y:\mybackup\docs
md y:\mybackup\favs
md y:\mybackup\contacts
md y:\mybackup\oebackup
:doit
xcopy /s /e /h /y "%USERPROFILE%\My Documents" y:\mybackup\docs
xcopy /s /e /h /y "%USERPROFILE%\Favorites" y:\mybackup\favs
xcopy /s /e /h /y "%USERPROFILE%\Application Data\Microsoft\Address Book" y:\mybackup\contacts
xcopy /s /e /h /y "%USERPROFILE%\Local Settings\Application Data\Identities" y:\mybackup\oebackup
Nice one Norm. Tell me something. If I wanted to add Outlook to this also would the command be:
md y:\mybackup\outlook
Yes, that line will make a dir named outlook in the mybackup dir.Roody wrote:Nice one Norm. Tell me something. If I wanted to add Outlook to this also would the command be:
md y:\mybackup\outlook
You also need a line to copy the files there.
Let me know where your Outlook files (I believe they are .pst files) are and I'll customize a line for you.
Brembo, not sure why yours stopped. Must be an error. Anything there showing an error?
Well I can put them wherever on my F drive. For simplicity sake I will go ahead and put them in the same directory you mention in your example.Norm wrote:Yes, that line will make a dir named outlook in the mybackup dir.
You also need a line to copy the files there.
Let me know where your Outlook files (I believe they are .pst files) are and I'll customize a line for you.
Brembo, not sure why yours stopped. Must be an error. Anything there showing an error?
Roody wrote:Well I can put them wherever on my F drive. For simplicity sake I will go ahead and put them in the same directory you mention in your example.
I think you'll need to put them on a partition. Do you have a Y partition or drive?
I could be wrong but that's how I understood it.
SG Theme SongThe Devil wrote:Tolerance is a virtue, not a requirement.
Here's everything in one batch file.
I call it gnight.bat
For XP only
First the backups are made, then kills IE, Explorer, MSN, OE, then the cache is cleared (twice, just to be sure) then my IP is released, then finally, my computer is locked up.(goes to the logon screen)
Again, don't forget to change the red Y's to a drive letter that is actually on YOUR machine (a partition, or a drive)
@echo off
if exist y:\mybackup goto doit
md y:\MyBackup
md y:\mybackup\docs
md y:\mybackup\favs
md y:\mybackup\contacts
md y:\mybackup\oebackup
:doit
xcopy /s /e /h /y "%USERPROFILE%\My Documents" y:\mybackup\docs
xcopy /s /e /h /y "%USERPROFILE%\Favorites" y:\mybackup\favs
xcopy /s /e /h /y "%USERPROFILE%\Application Data\Microsoft\Address Book" y:\mybackup\contacts
xcopy /s /e /h /y "%USERPROFILE%\Local Settings\Application Data\Identities" y:\mybackup\oebackup[/QUOTE]
taskkill /im iexplore.exe /f
taskkill /im wmiprvse.exe /f
taskkill /im explorer.exe /f
taskkill /im msmsgs.exe /f
taskkill /im msimn.exe /f
RD /S/q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /S/q "%USERPROFILE%\Cookies"
RD /S/q "%USERPROFILE%\Local Settings\History"
attrib -r -a -s -h "%USERPROFILE%\Recent" /s /d
del /f /s /q "%USERPROFILE%\Recent\*.*"
taskkill /im iexplore.exe /f
taskkill /im wmiprvse.exe /f
taskkill /im explorer.exe /f
taskkill /im msmsgs.exe /f
taskkill /im msimn.exe /f
RD /S/q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /S/q "%USERPROFILE%\Cookies"
RD /S/q "%USERPROFILE%\Local Settings\History"
attrib -r -a -s -h "%USERPROFILE%\Recent" /s /d
del /f /s /q "%USERPROFILE%\Recent\*.*"
start explorer.exe
ipconfig /release
%windir%\System32\rundll32.exe user32.dll,LockWorkStation
Note: When you log back in, don't forget you'll have to renew your IP before you can go online.
Start>run>ipconfig /renew
For now.
I'll make up a gday.bat soon
P.S
The google spider was just in this thread, cool
I call it gnight.bat
For XP only
First the backups are made, then kills IE, Explorer, MSN, OE, then the cache is cleared (twice, just to be sure) then my IP is released, then finally, my computer is locked up.(goes to the logon screen)
Again, don't forget to change the red Y's to a drive letter that is actually on YOUR machine (a partition, or a drive)
@echo off
if exist y:\mybackup goto doit
md y:\MyBackup
md y:\mybackup\docs
md y:\mybackup\favs
md y:\mybackup\contacts
md y:\mybackup\oebackup
:doit
xcopy /s /e /h /y "%USERPROFILE%\My Documents" y:\mybackup\docs
xcopy /s /e /h /y "%USERPROFILE%\Favorites" y:\mybackup\favs
xcopy /s /e /h /y "%USERPROFILE%\Application Data\Microsoft\Address Book" y:\mybackup\contacts
xcopy /s /e /h /y "%USERPROFILE%\Local Settings\Application Data\Identities" y:\mybackup\oebackup[/QUOTE]
taskkill /im iexplore.exe /f
taskkill /im wmiprvse.exe /f
taskkill /im explorer.exe /f
taskkill /im msmsgs.exe /f
taskkill /im msimn.exe /f
RD /S/q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /S/q "%USERPROFILE%\Cookies"
RD /S/q "%USERPROFILE%\Local Settings\History"
attrib -r -a -s -h "%USERPROFILE%\Recent" /s /d
del /f /s /q "%USERPROFILE%\Recent\*.*"
taskkill /im iexplore.exe /f
taskkill /im wmiprvse.exe /f
taskkill /im explorer.exe /f
taskkill /im msmsgs.exe /f
taskkill /im msimn.exe /f
RD /S/q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /S/q "%USERPROFILE%\Cookies"
RD /S/q "%USERPROFILE%\Local Settings\History"
attrib -r -a -s -h "%USERPROFILE%\Recent" /s /d
del /f /s /q "%USERPROFILE%\Recent\*.*"
start explorer.exe
ipconfig /release
%windir%\System32\rundll32.exe user32.dll,LockWorkStation
Note: When you log back in, don't forget you'll have to renew your IP before you can go online.
Start>run>ipconfig /renew
For now.
I'll make up a gday.bat soon

P.S
The google spider was just in this thread, cool

You're welcome guys, this is fun 
For Roody (and anyone else using Outlook)
add this line after the lastline starting with "md ".
md y:\mybackup\outlook
add this line after the last line starting with "xcopy"
xcopy /s /e /h /y "%systemroot%\Application Data\microsoft\outlook y:\mybackup\outlook
Note: If you already have made a mybackup dir, rename it before running this new code. If you do not then the outlook files will not be copied.

For Roody (and anyone else using Outlook)
add this line after the lastline starting with "md ".
md y:\mybackup\outlook
add this line after the last line starting with "xcopy"
xcopy /s /e /h /y "%systemroot%\Application Data\microsoft\outlook y:\mybackup\outlook
Note: If you already have made a mybackup dir, rename it before running this new code. If you do not then the outlook files will not be copied.