Backup Windows Live Mail in Window 7 using a .bat file

The location of all Windows Live Mail Data, including mail accounts and settings
( sans Contacts ... ) on my PC, is in:
C:\users\username\AppData\Local\Microsoft\Windows Live Mail\

or in DOS it looks like:
C:\users\username\appdata\local\micros~1\wif77b~1\

NOTE: You must use DOS names for a .bat to work.

Of course your username will be different so check that by opening a CMD prompt
cd.. ( up one level )
dir /x ( to see the DOS name for your username )

Also double check the DOS name for the folder called Windows Live Mail.
It's so cryptic on my PC that I suspect it might not be the same on all Win7 machines.


So here's what's in my .bat file:

xcopy /s /d /y /h C:\users\"user name goes here"\mydocu~1\appdata\local\micros~1\wif77b~1\*.* D:\wlmback\wlm
pause

Note that where it says "username goes here" you need to determine your username in DOS
and insert it in that place, not using the " ".


My proof that restoring this data works was to:
1) run my .bat
2) open C:\users\username\AppData\Local\Microsoft\Windows Live Mail\
and delete all contents of that folder
3) Reboot
4) Open Windows Live Mail ( the program ) to verify that it runs.
Yes it's good and all of my data was gone.
5) Close Windows Live Mail
6) Restore the data from my backup location to
C:\users\username\AppData\Local\Microsoft\Windows Live Mail\
7) Open Windows Live Mail and wooo hooo! There it all is.


To keep it clean you can delete your backup location and then recreate it everytime
you back up by using:

RD /S /Q \\machinename\driveletter\wlm
MD \\machinename\driveletter\wlm

NOTE that "machinename" and "driverletter" will be the name of your pc on the network,
and the drive letter where the folder "wlm" is located.

Return to PC Help Desk Main Page

Click for Contact