Entry
TSE: E-mail: Backup: Create: How to possibly create a backup of Microsoft Outlook Express e-mails?
Feb 12th, 2005 07:49
Knud van Eeden,
-----------------------------------------------------------------------
--- Knud van Eeden - Tuesday 29 July 2003 - 09:03 pm -----------------
The idea is:
1. get the hidden folder where Outlook Express stores its e-mails
2.1 Outlook Express stores each of your e-mail folders you
have created as a .dbx file with the same name as
that folder
Suppose you have created the folder 'yourname' in
your Microsoft Outlook Express, then so you will
at least find the following files on your harddisk in that
hidden folder:
yourname.dbx
and further you should see also:
inbox.dbx,
outbox.dbx,
'send to.dbx'
and so on ...
2. copy all this .dbx files (or just that .dbx file you need to
backup, for example 'yourname.dbx') to a destination directory of
your choice
---
You could write this in TSE of course,
----
The main thing is to get the hidden directory where this e-mails are
stored.
----
This path is a concatenation of the following:
---
If Windows 95/98/ME:
'c:\windows\Application Data\Identities\' + <some value which you read
from your Windows registry> + '\Microsoft\Outlook Express\'
---
If Windows NT/2000/XP:
<current user directory> + '\Local Settings\Application
Data\Identities\' + <some value which you read from your Windows
registry> + '\Microsoft\Outlook Express\'
---
to be more precise:
---
If Windows 95/98/ME:
'c:\windows\Application Data\Identities\' +
<registry value which you get from
HKEY_CURRENT_USER\Identities\Default User
ID> +
'\Microsoft\Outlook Express\'
---
If Windows NT/2000/XP:
<current user directory> +
'\Local Settings\Application Data\Identities\' +
<registry value which you get from
HKEY_CURRENT_USER\Identities\Default User
ID> +
'\Microsoft\Outlook Express\'
---
For example: the path to the Outlook Express .dbx files on a Windows
95/98/ME computer could be:
c:\windows\application data\identities\{1234507654F-GCDW-1234-
12345678ABC0935}\Microsoft\Outlook Express\
---
For example: the path to the Outlook Express .dbx files on a Windows
NT/2000/XP computer could be:
c:\documents and settings\Administrator\Local Settings\Application
Data\Identities\{1234507654F-GCDW-1234-12345678ABC0935}
\Microsoft\Outlook Express\
---
To use a quick and dirty method to do the backup, you could use the
following to copy/paste the path, and then use DOS Copy or Copy() in
TSE to copy all the files inside to a CD-R or similar:
1. Check manually the path where your .dbx files are stored:
1. Open your Microsoft Outlook Express
2. menu 'Tools'->
'Options'->
tab 'Maintenance'->
button 'Store folder
and then copy/paste this path to the clipboard.
---
Now to build up the folder path in TSE, you could use the following:
---
In Windows 95/98/ME you could use:
The first part of the folder you could get
by reading the environment variable:
WINDIR
e.g.
So you could use GetEnvStr( "WINDIR" ) in TSE.
That should give e.g.
'c:\windows'
---
In Windows NT/2000/XP you could use:
The 'current user directory' you could for example get in TSE by
reading the environment variable:
HOMEPATH
e.g.
So you could use GetEnvStr( "HOMEPATH" ) in TSE.
That should give e.g.
'c:\documents and settings\administrator'
---
The big problem in TSE is how to read the registry value:
HKEY_CURRENT_USER\Identities\User ID
but there seems to be Semware in-house program/TSE macro for that,
which possibly might become available.
---
But if you are using 4NT (tested in v5.00u) / 4DOS (should work in
v7.5)
you could use the
@REGQUERY
function to get this value.
Just type on the 4DOS/4NT command line:
echo %@REGQUERY[ "HKEY_CURRENT_USER\Identities\Default User id" ]
and you should get something like:
{1234507654F-GCDW-1234-12345678ABC0935}
So to get this value programmatically, you could use something like
this
PROC Main()
Dos( 'c:\4dos\4nt.exe echo %@REGQUERY
["HKEY_CURRENT_USER\Identities\Default User id"] >c:\ddd.txt' )
EditFile( 'c:\ddd.txt' )
// and then get the value out of this file, e.g. using LFind
( '{\{.*\}}", "x" ) and GetFoundText( 1 )
// after which you delete your temporary file, e.g. using Dos( "Del
c:\ddd.txt" )
END
---
To create a backup of all your Microsoft Outlook e-mails at once (this
might take a long
time, because usually this are large files),
you can then e.g. use something like:
---
in Microsoft Windows 95/98/ME:
Proc Main()
Dos( 'Md c:\mybackupdirectory\' )
Dos( 'Copy' + ' ' + 'c:\windows\Application
Data\Identities\{1234507654F-GCDW-1234-12345678ABC0935}
\Microsoft\Outlook Express\*.*' + ' ' + 'c:\mybackupdirectory\' )
End
<F12> Main()
---
in Microsoft Windows NT/2000/XP:
Proc Main()
Dos( 'Md c:\mybackupdirectory\' )
Dos( 'Copy' + ' ' + 'c:\documents and settings\administrator\Local
Settings\Application Data\Identities\{1234507654F-GCDW-1234-
12345678ABC0935}\Microsoft\Outlook Express\*.*' + ' '
+ 'c:\mybackupdirectory\' )
End
<F12> Main()
-----------------------------------------------------------------------