Export to Directory

I exported a folder from the email archive to a directory but the names of the eml files are not really usable for (e.g. message-1-46242.eml). It would be nice if there was an option to export the emails but using the subject line as the filename which would make finding a specific email that much easier and quicker

Hello @DrTs,

we discussed this some time ago internally,
but one big issue cannot be resolved and will lead to problems:

Subject-Lines are not unique.
While they can occur again and again in emails,
a file name must be totally unique.

Let’s say you have a subject “Daily Report” from a machine or system.
We cannot save “Daily Alert.eml” two, three, four … times in a file system.

The current name represents an ID which is an ongoing number pattern.
They are unique and will never cause any conflict.

So I understand your request, but it technically, this cannot be done without causing a lot of new issues.

Hi Rebecca,

Thank you for the quick reply. I totally understand where you are coming from. How about a hybrid approach? Something like Subject-Unique Number. So the filename would become a combination of the subject line (which may not be unique) and the sequence number (which is unique). That would guarantee you a filename that would not be duplicated.

The only other thing you would have to watch for is since a subject line can contain things like : \ etc. that you would have to clean the resulting name so that it is a valid under Windows naming conventions. But even with cleaning the name the main subject would still be recognizable and useful to the user


Hi @DrTs,

That sprang into my mind a few hours later actually. You definitely see the point here. Great :slight_smile:

We still have problems here, as a unique number added to a subject could result in a very long file name.
Windows does not support endless file names.

According to RFC 2822, emails can have a subject length of 998 characters maximum,
Files in NTFS can only have 255 characters,
and the complette path with file name together only about 32.000 …

And if you imagine the only suitable way, which is converting the name into a ASCI string suitable for file names, cut off at a certain number of characters, followed by a unique ID …
it does not look very good and not help you either.

The subject
"SPAM" Hey André, hier drüben: htts://www.some.link weiß mehr?

would look like

%22SPAM%22%20Hey%20Andr%e9,%20hier%20dr%fcben%3a%20https%3a%2f%2fwww%2esome%2elink%20wei%c3%20mehr%3f - k254298wjefj4nr3i4h9834fjkn34... .eml

to be absolutely failsafe not causing erros with file systems.

I do definitely understand your issue here, but there were very variuos reasons, just to see some in this topic, we cannot provide a clean text file name that helps, and instead we decided to use a very reasonable ID number that also indicates its source position in the archive it came from. This will always bee plain character file name compatible code.

I cannot list all reasons engineering once evaluated,
but it lead to the current decision.

1 Like

Hi @DrTs,

one thing I totally forgot to mention is the ability of Windows Explorer to show additional file details.

So in Windows Explorer, when inside the folder of the exported eml files, select the Explorer Tab “View”,
choose the “Details” or “List” view and then in “Add rows” you can either select recommended or user defined rows,
such as Subject, From, To etc.

it is the similar thing you could do with mp3s instead of having a bloated name,here you would also be able to show track number, title, author etc.

1 Like

Hi Rebecca,

I wasn’t thinking about the filename length limitation. You are entirely correct on that. Windows 10 is supposed to have removed some of that limitation but I don’t think it is implemented in File Explorer yet.

And I did not even think about changing the view to include the subject line. It’s slower searching that way but at least the information is there for me to search.

Thanks for all of your feedback :slight_smile:

No problem.

It is not as easy as I thought to collect all issues that lead to that decision in the past.
But it had some very reasonable cause.

I am glad I could help.

What exactlty IS the file naming convention Mailstore used when exporting multiple eml files? It doesn’t quite seem to be numerical. e.g. Message-1-23, Message-1-25,…