Link to home
Start Free TrialLog in
Avatar of Robert Berke
Robert BerkeFlag for United States of America

asked on

How to mass convert Filename.eml to Filename.msg while keeping them in original subdirectories?

Does anyone know of a utility that walks an explorer directory and subdirectory converting every .eml file into a .msg file?

My company has used Outlook express for 4 years, and we often copied emails to various Windows Explorer directories.

Each e-mail copied resulted in an .eml file like "Hey Santa, here is my xmas list.eml"

Find File .eml reveals that we have 3000 such files spread over 100 subdirectories.

We have converted to Outlook 2003, and everybodies e-mail Mailbox folders were converted.

But, the Windows Explorer folders still have the .eml files.  Every time an .eml is opened, Outlook Express is invoked which confuses our people.

Does anyone know of a utlity that will convert these files.  I have looked through slipstick, and found a utility that imports them into an outlook folder, but I want to leave them in their original folders.

I'm thinking of dragging the .eml files into an Outlook Express folder, converting that to outlook and dragging them into a explorer directory.BUT, how do I distribute the items back to their original 100 subdirectories?



Avatar of Mob-bom
Mob-bom

>>>BUT, how do I distribute the items back to their original 100 subdirectories?
I'd say you would have to do iot manually; whether you do one subdirectory so you can drag and drop groups, of batch convert them to outlook and then redistribute them back one at a time.  

What about changing the file extension from eml to txt?  Yes, it would need to be opened in notepad or similar, but it would elimnate the manual conversion and redistribution of the eml files. - Just a thought.
Avatar of Robert Berke

ASKER

Changing to .txt is WAY too ugly for the people that use these 3000 e-mails.

PLEASE, SOMEONE HELP ME WITH THIS.  There has got to be a utility somewhere that will do what I want.

Q_20621333 has no suggestions that are reasonable for 3000 e-mails in 100 directories.

>>>BUT, how do I distribute the items back to their original 100 subdirectories?

I may have to write my own solution. It would take me at least a day, but I know its possible.

1. find file r:\root\*.eml and drag all files into OutlookExpressFolder
2. export OutlookExpressFolder to OutlookFolder
3. Drag all e-mails from OutlookFolder to r:\ConvertedRoot\
4. Use vba and dir(r:\root\*.eml) to walk original files.  Save the attributes into vba arrays arySubject(1 to 3000), aryTimeReceived(1 to 3000), aryFolderPath(1 to 3000) etc.
5. use Vba and dir(r:\ConvertedRoot\*.msg) to walk through converted files.
6.  while walking, match currentItem.TimeReceived to aryTimeReceived(x)
7. Rename r:\ConvertedRoot\currentItem to r:\aryFolderPath(x)\currentItem

Of course, lots of little wrinkles, for instance I have noticed the "time received" is not entirely consistent between Outlook and Outlook Express.  Sometimes they are off by a minute (possible rounding differences) and sometimes they are off by exactly an hour (probably because of daylight savings time.)

Hope I don't have to do this myself.
Why not use DOS to do this?

Go to the directory in a DOS window and type the following at the prompt

rename *.eml *.msg

The /s switch does not work with rename but it should not take you long.

RCMB
rcmb: That does not work, we need to CONVERT the files, not just rename them.
How about this: in dos, append the directory to the subject, and then copy to the import directory. [ush WSH, or VBA, or whatever you are most comfortable with]
Import em all in OE, migrate to OL, and save out to disk.
Either in the save out to disk code use the directory info in the subject to write things tot he correct directory (and remove this tag from the subject) OR save out to one location and refile/rename in dos.
Great minds think alike.  I tried that yesterday, but it doesn't work (at least with OE6 and XP pro).  

1. dragged SubjectTest from OE to desktop SubjectTest2.eml
2. renamed SubjectTest.eml to SubjectTest2.eml
3. dragged SubjectTest2.eml back to OE.

OOOPS, the name has been CHANGED BACK to SubjectTest.eml!!  

I can only guess why. Opening subjecttest2.eml with notepad reveals that the original subject name remains inside the document.  That is probably extracted when you drag the .eml back to OE.

I confirmed this by changing it inside of the document, then dragging it back to OE. The new name is now honored, BUT it screws up attachments.

My hope for a solution is fading fast.
hi try this software
http://www.thebeatlesforever.com/processtext/abcbeck.html

This is ABC Amber Becky convertor

i hope that solves your problem...
mohsyn, thanks for the suggestion, but I checked out ABC Amber Becky convertor about 2 weeks ago, but none of their products outputs a .msg file.

I e-mailed them, and someone replied with a long e-mail thread that lead me to believe it might be a low level technician that didn't understand what I wanted, or perhaps had a different native language.  Nonetheless, he/she promised me they would add the required capability soon.  I'm sure someone in the organization has the smarts to do it, but I am doubtful that it will happen in my lifetime.

I tried doing it manually as I outlined in 4/23 12:39pm post.  What a nightmare!  Turns out many e-mail's were copied into 5 different folders, then the *.eml files were renamed to have 3 different values. When they are restored, all 5 are returned to their original subject.  When these were dragged to r:\convertedRoot\ then names became "Origsub", "Origsub(1)", "origsub(2)" etc.  Other problems: subjects like "please call" were repeated dozens of times.  So, I tried to only match on date.  But, for some reasons the date was often different by exactly 1, 2, 3, or even 4 hour with date and mm:ss being the same.  Plus, a dir *.* showed the the e-mail received date was usually stored in "Date Modified", but the true date sent and date received are not available from dir *.*, I would have to extract it from inside the *.eml.

After about 6 hours, I just gave up because it became clear it was a much bigger problem than I had hoped.

I think I may just rename everything from "*.eml" to "*.eml.txt" and make them read only.  That will allow people to double click and read the message body.  If they want to read the attachments, they can copy the file and rename it back to *.eml the read it with outlook express.

I think I'll close this problem early next week and award points to the folks who tried to help.
ASKER CERTIFIED SOLUTION
Avatar of rosesolutions1
rosesolutions1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
outlookextract comes close to what I need, but doesn't quite make it.

Functionally, it is the first product I have seen that can convert a .eml to .htm without opening Outlook Express or Outlook.

It can't convert .eml to .msg, but I can live with that.

It also can't do the conversion in a mass maintenance mode, I have to do the conversion manually for each of my 300 folders.

Also, if there are 10 e-mails with attachments OutlookExtract creates a SINGLE subfolder named Attachments, and dumps all of the attachments there.  This is the killer, since I think the e-mails would lose all integrity

Nonetheless, thanks for trying-that was almost the answer!
rosesolutions1:

I contacted the outlookextract people, and they said something like "we feel that feature is worthwhile and will add it to our software in the next month".  The e-mail came from someone who clearly worked directly with the developers and clearly understood the request, so I've got a hunch they will actually do it.  I am keeping this question open for a few more weeks in hopes that I will have good news to report.

The OutlookExtract developers have modified the product so that it can automatically convert ever *.eml to a *.mht.

Right now, the *.mht still insists that all attachments end up in a SINGLE subfolder, but they say they will fix that soon.

I am so impressed with their support and their product, that I am going to close this question.

Thanks greatly to rosesolutions1 for pointing me in the right direction.
hello, rberke
This is Yernar, “a low level technician” (as you called you)…
I just added a new feature to our product that’s called ABC Amber Outlook Converter.
After you run the application:
1.      Select “Import” tab
2.      Click “Open a folder with EML/NWS Files” button
3.      Select the folder with your eml files
4.      Click OK button.

After that you will see all emails displayed in the list. Select the messages you want to convert and click “Convert to MSG” button.
Hope this will solve your problem.
Correction:
This is Yernar, “a low level technician” (as you called me)
Yernar,   my most sincere apologies if I offended you.  In my own defense, my exact words were "MIGHT be a low level technician".  And even then, I meant to say "several levels below the company owner", and never meant to comment about your technical expertise.

Your new feature does EXACTLY what I wanted, which was to create a MSG file.  The OutlookExtract solution created an MHT file with embedded links to attachments, which was only "CLOSE ENOUGH" to what I wanted.

Unfortunately, I have put that project to bed for now, and will not have the time to revisit it for quite some time.

Nonetheless, to future reseachers who stumble across this thread:  

I consider the author of the many abc conversion utilities, to be of the very highest level.  Their software is very impressive.