Outlook Express Email Folder Recovery without Losing Existing Hierarchy

Categories: Personal, Tools
Tags: No Tags
Comments: 16 Comments
Published on: November 9, 2008

It happened to me a few days ago that Outlook Express suddenly did not show a bunch of email folders anymore. I freaked out at first, because I thought that the emails were lost, but I found out that this was not the case.

The emails were still there, but the folder file, which is created for each and every email folder in Outlook Express was simply missing in the OE folder hierarchy. Phew! I thought, that should be fixed in no-time at all. Well, I learned that I was mistaken, because there is no way to tell Outlook Express, that it has a file for an email folder sitting in its directory together with the other email folder files and that it would be great to simply add that to its folder index. I thought that this cannot be. And found something promising after a few searches at Google.

This Microsoft Knowledge Base article describes the scenario for how to recover email folders in Outlook Express, if there are any missing in the OE folder index. Great! But wait, there is a catch. If you follow the (incomplete by the way) instructions, you end up with all folders back in Outlook Express, alright, but without the existing folder hierarchy. Every email folder is now in the root, no sub-folders anymore.

Well, I have over 1,000 folders that are organized in a complex hierarchy that can go 4-5 levels deep. I only miss a few folders. Why should I screw up the hierarchy of all the hundreds existing folders in order to get those few folders back into OE. That does not make sense to me, but I wasn’t able to find anything near a solution for this extended version of the not so uncommon issue.

If you only have a few folders and don’t mind to restructure all of them again, then you do not have to read much further. Only a few more paragraphs, because it contains some useful information that are missing in the Microsoft KB article, in particular the specification where exactly Outlook Express stored the email folders on your hard disk. It also has some other catches. Let me quote a MVP from Microsoft regarding what you will have to do, after you deleted the folder.dbx file and have Outlook Express recreate it for you:

  • Re-create your mail folder hierarchy by dragging folders into place in the Folder list. Note that any folder you have created to group sub-folders but that does not itself contain messages will not appear in the Folder list and so must be created again.
  • Re-download the list of newsgroups from each news account.
  • Reset your subscribed newsgroups and download messages again.
  • Reset synchronization options on IMAP and newsgroup folders.
  • Edit any message rule that moves or copies messages to folders other than the Inbox (Note by Carsten: since none of the old folders are there anymore, even if you recreate them with the same name)

Not nice, Not good .. okay, whining does not help us with our existing problem though.


Outlook Express files are stored by default at
C:\Documents and Settings\\Local Settings\Application Data\Identities\{GUID}\Microsoft\Outlook Express

I also heard that it could be stored at:
C:\Windows\Application Data\Outlook Express\{GUID}

I have never encountered the second scenario so I decided to ignore it for my solution. The folder stated first is usually hidden from the user. The must be replaced with your user name, which could also include the domain or workgroup name of your account, such as USER.DOMAIN, but you should be able to figure that out, if you look at the sub directories of the C:\Documents and Settings folder. The {GUID} part is not obvious at all and tricky to determine, if more than one Outlook Express Identity was created for the same Windows user. But I have some tool to help you with this stuff.

The Steps

sml_OE_FolderSettings_ShowHiddenAndSys 1. To make sure that you can see the folders?? in general, change some of your Folder display options. To do this, go in Windows Explorer to “Tools\Folder Options” and select the “View” tab (see image).

Within the top 10 options should be a checkbox for “Display the contents of System Folders“, which you have to enable and a group called “Hidden files and folders” with the two options “Do not show hidden files and folders” and “Show hidden files and folders” to choose from. Make sure that the second option “Show hidden files and folders” is selected.

2. I wrote a little Visual Basic script that you can download here, which is called “oeidentity.vbs” (right-click and select “save as”, change file extension from “.txt” to “.vbs”). You should be able to execute it by double-clicking it from within Windows Explorer after you downloaded it. It requires that the last Outlook Express Identity that was opened by the currently logged-in user was the Identity with the missing folders. If you don’t know what I am talking about, because you do not have multiple Identities to switch in between and therefor have no clue what I am referring to, just ignore this part and just execute the script.

The code is pretty simple

Dim WshShell, IdentityName, IdentityGUID 
Dim sDirLookup, sDirLoc, sMsg

Set WshShell = WScript.CreateObject("Wscript.Shell")

IdentityName = WshShell.RegRead("HKCU\Identities\Last Username")
IdentityGUID = WshShell.RegRead("HKCU\Identities\Last User ID")

sDirLookup = "HKCU\Identities\" & IdentityGUID &_
"\Software\Microsoft\Outlook Express\5.0\Store Root"
sDirLoc = WshShell.RegRead(sDirLookup)

Set WshShell = Nothing

sMsg = "The Last Used Identity for this user was the following" & vbcrlf
sMsg = sMsg & "Name: " & IdentityName & vbcrlf
sMsg = sMsg & "ID: " & IdentityGUID & vbcrlf & vbcrlf
sMsg = sMsg & "The Storage Location for this Identity is" & vbcrlf
sMsg = sMsg & sDirLoc

Wscript.echo sMsg

WScript.Quit

3. Now you know where your Outlook Express files are. Now it is also a good time to check if the missing folders are really just missing in the OE folder index or were actually deleted from your hard drive. If that is the case, then you have to do an additional step, which is the recovery of those deleted folder files.

3.1 There are various tools out there, but the one that I use in cases like that is called Get Data Back NTFS by Runtime Software. They also have a version for FAT partitions, in case that your hard drive is using that instead of NTFS (which is the recommended default for Windows XP). I suggest getting the bundle that also includes the DiskExplorer for NTFS (or FAT respectively), especially if you only want to recover individual files and are not sure what the name of those files are.

3.2 Okay assuming now that there are files for the folders that you are missing in the Outlook Express folder tree. You can tell, which file belongs to the missing folder, by simply looking for files that are called “Missing Folder Name.dbx” or similar, e.g. “Missing Folder Name (1).dbx” etc.

If a whole tree or trees are missing, things are a bit more complication as they were in my case. I cannot tell out of my head what all the sub folders were of the folders that were gone missing. So I had to come up with a way to determine, which of the files/folders are actually missing in the folder hierarchy.

4. To do that, I created a folder called “C:\OEBackup” and below that a sub folder called “Files“. I then copied all files from the Outlook Express folder to this new folder at “C:\OEBackup\Files“. I then created two additional sub folders under C:\OEBackup, one called “FoldersOld” and one called “FoldersNew“, making it three sub folders altogether.

5. As I mentioned, Outlook Express saves the Folder Hierarchy in a file called “Folders.DBX” and imports all files/folders to rebuild the index, if this file is missing. But we still need the old and incomplete Folders.dbx for something, so MOVE it from the Outlook Express folder to C:\OEBackup\FoldersOld instead of just deleting it.

6. Before you start Outlook Express again to have it rebuild the index, one more thing. You do not want OE to check for any new emails to download while we are working on cleaning up this mess. That is not as easy to do as it sounds, if you have enabled that Outlook Express should check for new messages during program start.

OE_Regeditstart

Let us disable that and also the checks after X minutes that you probably also configured, but without starting Outlook Express itself. You have to change two settings in a file called the Windows Registry.

To do that, click on “Start” in the start menu and select “Run“. Type into the box there “Regedit” and press enter.

Navigate to the following location within the registry and change the mentioned entries as specified.

[HKEY_CURRENT_USER\Identities\YOURIDENTIY\Software\Microsoft\Outlook Express\5.0\Mail]

Entry: “Check Mail on Startup


Change value from 1 to 0

and to avoid checks later also change the following (same “directory” in the registry)



[HKEY_CURRENT_USER\Identities\YOURIDENTIY\Software\Microsoft\Outlook Express\5.0\Mail]

Entry: “Poll For Mail


Change existing (hexadecimal)* value to: ffffffff??

*It contains the interval for OE to check for new messages, that is configured under Tools\Options, General Tab, Checkbox: “[ ]Check for new messages every [ number ] minute(s)” The value stored in the registry is actually the hexadecimal representation of the specified minutes in milliseconds. A 5 minutes interval for example would be 300,000 milliseconds, or in hex 0x000493e0

sml_OE_CheckMailOnStartUp_Reg

sml_OE_automatic_email_check_settings Here is what the same change would be in Outlook Express, if you would do it there. Click the image to the left to enlarge.

The image above shows how you do the same change via the Windows Registry, without starting Outlook Express and risking that you are not fast enough and new messages could be downloaded. If you cannot read it, click on it for an enlarged version of the same image.

7. Now you can start Outlook Express again and have it rebuild the folders.dbx and with it your email folders list, without hierarchy.

8. Remember the backup that you created under c:\OEBackup\files, which also should contain the old and incomplete folders.dbx? Now you need it, because you have to import it into Outlook Express now.

Yes, It will create tons of duplicates, but that cannot be avoided for the step that comes. However, you still keep that backup, because we will need it again to get rid of those duplications.

sml_OEBackupImportIn order to import the folders and emails from the backup, select from within Outlook Express at the top menu “Files” and then “Import“.

A wizard pops up where you have to select the email program to import from. Select “Microsoft Outlook Express 6” and press “Next“.

In the next screen select “Import mail from an OE6 store directory” and press “OK

Browse for the Backup folder at C:\OEBackup\files in the screen where you have to specify the “Location of Messages” and then press the “Next” button.

The following screen lets you select folders. Simply choose “All Folders” and press “Next“. Outlook Express will now import the folders and messages from your Backup. You might noticed that it shows in the folder selection your old tree. That is the fact that I am relying on. OE only imports the folders that it knows about from the old folders.dbx and thus, does not import the folders that are physically there, but not in the index.

To see the steps that I just described with your own eyes, click on the screen shot thumb image on the top-left.

9. When the import is finished, close Outlook Express and download this script file called oecheck.vbs (right-click and select “save as”, change file extension from “.txt” to “.vbs”). You don’t have to modify the script, if you saved the backup at C:\OEBackup\files like I told you to do and if you did not opened another Outlook Express identity before you got to this step of the process. It’s highly unlikely, but I just wanted to make sure. If not, open the script in Notepad and change the settings at the beginning of the script manually.

The script creates a file called “oefldcompresults.txt” in the same directory where you saved and executed the script itself. It contains a list with all the .DBX files that are missing in your old backup copy of Outlook Express.

10. Move the folders.dbx from the OE directory to the C:\OEBackup\FoldersNew directory and then delete the rest of the files in the directory.

11. Now I want you to delete everything in the default Outlook Express directory. Yes, you heard right. Do not delete the Backup though.

12. Now take the list of files listed in oefldcompresults.txt and copy or move them back to the now empty Outlook Directory (its up to you now, if you want to move of copy the files, depending on how safe or how quick you want to be) . If you want to be safe, actually move the files to a new and separate directory first and then copy them back to the Outlook Express directory. Just do it. It will make sense to you within the next 2 steps, I promise.

13. When you are done, make sure that the folders.dbx was not one of those files. It shouldn’t, but double checking does not hurt. Start Outlook Express again and it should create a new folders index, just for the folders/files that were missing in the first place.

14. Close Outlook Express again. Move or copy all files from the Outlook Express directory that you copied/moved just before, but now including a new folders.dbx file to C:\OEBackup and the files that are not in oefldcompresults.txt, including your old folders.dbx back to the Outlook Express directory

So the Outlook Express folder should now only have the .DBX files for the folders that it actually has in the old and incomplete folders index and the ones it does not, should be all in the directory C:\OEBackup with their own folders.dbx definition.

15. Start Outlook Express again and perform the same import steps as you already did once, with the only difference that the Location of the Messages would be “C:\OEBackup” rather than “C:\OEBackup\Files“. You should notice in the “Select Folders” screen that it only shows the folders that you were missing without a hierarchy though.

16. Once the import is done, you should have your old and existing folders still there, structured and in hierarchies and only the folders that were missing added at the root level without a hierarchy. Those you have to rearrange by hand though, because that hierarchy was already gone for good without hope for recovery.

Another Alternative (If available)


The only alternative option that you have is using an old backup version of the folders.dbx file from your regular data and system backups that you hopefully do?? from time to time. As long as that version does not miss any folders that you created after the backup, you should be fine, if you use it. But if not, sorry, you have to do the painful steps that I outlined in this post.

After thoughts


There is a commercial OE API that has nice features and might provide the basis for a better solution than mine. If you know or have a better solution, please share it in the comments section with me and other readers. I’d appreciate it.

Cheers and I hope that this post was helpful to another poor soul like me out there that ran into the same issue.



Outlook Express Tools and Resources


Here is also a list with other Outlook Express tools and resources that might be useful to you.

  • OutlookExpressExtraction.zip (800KB) and the Help File (300K) is an useful and free command-line based tool by Ian Macallan (1) that extracts email + their attachments from Outlook Express .DBF files to .NWS format. The tool is fast and capable of processing vast amounts of emails (I know that, because I tried it myself :))
  • OEHelp.com – Offers several Outlook Express and Windows Mail tools, such as DBXtract, DBXpress, OEX, OE Toolbar and OEBackup. Some of them are free, but most are available for a low fee ($9-$30).
  • Outlook Express Tools at Mailhilfe.de – Has over 50 tools for Outlook Express listed. The listing is German, but the tools are mostly English
  • Inside Outlook Express at InsideOE.com By Tom Koch, a Microsoft MVP provides tons of useful insights into the inner workings of Outlook Express and tips and solutions for all kinds of problems aand tweaks related to the software.
  • ScanDBX.com – commercial tool for about $40 that can detect and repair various Outlook Express Problems, including corrupt .DBX mail files.

Cheers

Carsten aka Roy/SAC

16 Comments
  1. GCS says:

    Your comment:
    I also heard that it could be stored at:
    C:\Windows\Application Data\Outlook Express\{GUID}

    I have never encountered the second scenario so I decided to ignore it for my solution.

    This method is used for Windows 9x.

  2. Hi GCS,
    thanks for the comment. Did you ever had the case that message folders were gone in Outlook Express, but with the messages file for the missing folder still there? I mean there got to be a better way to get a folder file back into the folder hierarchy of OE. I was astonished when I was looking for a solution and did not find any, not even on those specialized OE support and info websites by MS MCPs and Developers.

  3. Alex says:

    Advise similar application-recover .dbx files,supports a great number of features, that turns email into a powerful tool to run business,program analyzes all files of dbx format from Outlook Express root directory and unpacks messages, even if these files are infected or seriously damaged,recover Outlook Express dbx file is compatible with Windows 2003, Windows XP, Windows 2000, Windows NT 4.0, Windows Me and even Windows 98, that is currently not supported by Microsoft Corporation, all versions of Outlook Express are supported.

  4. Alex… Is the tool that you mentioned also able to help you with rebuilding the folders hierarchy within the folders.dbx file, e.g. add missing folders (mail .DBX files within the outlook express data folder) to an existing folder.dbx file?

    Because then you would only have to re-arrange those few missing folders (which you have to add to the root, obviously), instead of having to re-arrange everything, if you go the MS recommended route and delete the folders.dbx file completely.

  5. Doug says:

    Hi – Trying to use ur info to get my OE folders back – but – cannot get the ‘oeidentity.vbs’ download to run – only gives me a msg about last used identity ??

  6. Doug says:

    Thought I would be a bit more explicit in what I am trying to fix – signed into OE a few days ago to discover – all message in my Inbox that had been opened-gone!; all sub-folders of my Inbox containing read/filed emails (about 2 dozen)-gone!;folder People containing a dozen sub-folders with phone numbers, addresses and such of my friends-gone! Only thing remaining was unopened emails in my Inbox. I’m searching for a way to recover all this.

  7. Hi Doug,
    Yeah, the script returns the value of the last used identity. That long and weird string is needed to find your OE folder on your hard disk (which is explained in more detail in my post).

    This will help you to find out, if there are still files for the entire folders that are missing. Based on the the file-size of them (if they still exist), can you kind of guess, if emails (including emails in folders that are still there, but miss email messages) got lost entirely or just not accessible by OE and not shown for that reason.

    Have a look at this web page. It provides some information to the problem that you described. It also refers to email recovery tools that I would have recommended also.

    I bought myself a license for DBXtract. I had the same problem as you had about 2 years ago, which is different from the issue that I wrote about in this post. I purchased back then a tool called Advanced Outlook Express Recovery, which you can download (demo) and purchase ($49.95) at this website.

    It worked alright, but the price was not so nice. I have not tried DBXtract for email recovery yet (never had that issue again) to be able to say, if it works as good or not. It certainly works well to extract intact emails.

    I suggest to try DBXtract first and if the results are not satisfactory, try out the AOER demo and buy it, if it appears to be able to do the job.

    I hope this helps you with your problem. Cheers!

    Carsten

  8. Anonymous says:

    For work with office and also outlook express and perhaps outlook files advise use-dbx file recovery,it has many features and as far as i know is free,program extracts and saves the user’s messages from files with the dbx extension that Outlook Express uses to store folders, messages and news on the local disk,extract the user’s correspondence from a corrupted .dbx file and to save messages to separate files of the *.eml format (RFC822 standard) after that,program will probably be able to undelete messages permanently deleted from the Deleted items folder,can also easily copy (or move) a message in the *.eml file to Outlook Express folders or to other programs supporting this standard,supports previewing the message bodies being recovered and stored in .dbx files (including corrupted dbx files),tool can recover Outlook Express data from *.dbx files in the batch mode,working with dbx files for Outlook Express versions 5, 5.5 and 6,tool running under all Windows operating systems starting from Windows 98 (Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows 2003).

  9. Anonymous says:

    For recovery outlook express files advise use this tool-outlook express inbox recovery,it is free,program extracts and saves the user’s messages from files with the dbx extension that Outlook Express uses to store folders, messages and news on the local disk,extract the user’s correspondence from a corrupted .dbx file and to save messages to separate files of the *.eml format (RFC822 standard) after that,program will probably be able to undelete messages permanently deleted from the Deleted items folder,can also easily copy (or move) a message in the *.eml file to Outlook Express folders or to other programs supporting this standard,supports previewing the message bodies being recovered and stored in .dbx files (including corrupted dbx files),tool can recover Outlook Express data from *.dbx files in the batch mode,working with dbx files for Outlook Express versions 5, 5.5 and 6,tool running under all Windows operating systems starting from Windows 98 (Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows 2003).

  10. Dennis says:

    Unfortunately nothing has helped. Removing Folders.dbx does not restore folders for me in any way. I get 3 folders back, but not 50 that I’ve had. Other software solutions mentioned in the posts did not help . . . I am puzzled. And I am also starting anew . . . i.e. no messages in my OE.

  11. Hi Denis, if the removal of the folders.dbx only resulted in the creation of 4 instead of 50 folders that means that there is more damaged than just the folders.dbx. Do you have an older backup of the Outlook Express folder? Don’t use it to restore everything, because all emails since the backup would be lost. Only copy the old folders.dbx file back. That worked for me.

  12. Anonymous says:

    There is a good tool for work with outlook express files-inbox.dbx repair,tool is free as far as i know,it extracts and saves the user’s messages from files with the dbx extension that Outlook Express uses to store folders, messages and news on the local disk,extract the user’s correspondence from a corrupted .dbx file and to save messages to separate files of the *.eml format (RFC822 standard) after that,program will probably be able to undelete messages permanently deleted from the Deleted items folder,can also easily copy (or move) a message in the *.eml file to Outlook Express folders or to other programs supporting this standard,supports previewing the message bodies being recovered and stored in .dbx files (including corrupted dbx files),tool can recover Outlook Express data from *.dbx files in the batch mode,working with dbx files for Outlook Express versions 5, 5.5 and 6,tool running under all Windows operating systems starting from Windows 98 (Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows 2003).

  13. datanumen says:

    Do you know a very nice application Advanced Outlook Express Repair. It is a powerful tool to recover messages, folders and other objects from corrupt or damaged Microsoft Outlook dbx files.

  14. Hi datanumen, I actually do know Advanced Outlook Express Repair and even purchased a license of it a couple years ago. It helped me to recover emails after OE got screwed up, because the computer shut down during the “compact emails” process. It was a lifesaver.

    However, you don’t have anything to recover folder structures, unless that feature was added after I purchased by license.

    If you do, please let me know and if you don’t, consider this a recommendation for a feature that would distinguish your product from everything else that is out there and I know about (I spent a considerable amount of time researching and testing various different tools, beyond the ones that I mentioned in my article, so I know a lot, if not most of the apps out there).

  15. WORKAROUND
    To import a single OR MULTIPLE .dbx file or files:
    Right-click the Inbox, and then click Properties. Note the folder in which the Inbox.dbx file is stored.
    Quit Outlook Express.
    Use Microsoft Windows Explorer to copy the .dbx file(s) that you want to import to the folder that you noted in step 1. Make sure that you give the file a unique name that does not conflict with any other .dbx file in that folder.
    NOTE: This name becomes the name of the folder in Outlook Express.
    In the folder that you noted in step 1, rename the Folders.dbx file to Folders.old.
    Start Outlook Express.
    In the Folders pane, you see the .dbx file that you copied. You can drag items to their appropriate locations, or rename the folder.

  16. tech says:

    Nice information has been given about Outlook Express email recovery but lengthy. Instead of following this lengthy process why do not one use an effective Outlook Express recovery tool. One of the best Outlook Express repair and recovery tool, which arranges the emails folders in hierarchy after recovery and helps you easily navigate through those recovered folders.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

NOTE! I believe in the right for freedom of speech and personal opinion and are against censorship, so feel free to tell me what you think and let me and others hear your opinion on this subject, but please avoid using the f-word and s-word as much as you possibly can, because at the end of the day this blog exists for the purpose of useful exchanges of thoughts, ideas and opinions and not as a valve for your accumulated anger and frustration. Get a shrink for that! Thanks.

Welcome , today is Thursday, March 28, 2024