Imported Files revert back to original file names

I’ve come across an issue I’ve never encountered before and need some assistance. I spend some time today renaming some email files (.eml) that were exported out of DevonThink Pro. I was working on my laptop, which doesn’t have DevonThink Pro and renamed all the files, one-by-one. I’m trying to import them back into DevonThink Pro, but for some reason, the file names are going back to the original titles.

For instance, I have a email originally called “Lee Valley Tools Order Confirmation” that I renamed to “2012-09-01 | Lee Valley Tools | $53”

I’ve imported them many different ways and my email will go back to “Lee Valley Tools Order Confirmation”

I’ve tried emptying the cache and erasing all of the original files left in the database, but still no luck.

What is going on?

DEVONthink imports emails and names them according to the message’s subject line (DEVONthink’s metadata properties call this the “title”). You can rename the document once it is imported, but not before. It’s easy to test. Rename an .eml file that’s stored in a database, drag it to the desktop, and then reimport it – DEVONthink imports it with the embedded title as the document name.

I assume the behavior is to ensure that the attributes of imported email is consistent with the source messages - e.g, for threading conversations. Either rename your documents after they are imported, or save them as RTF files from Mail, rename them, and then import them.

What I want to know is how you can place an order with Lee Valley that is only $53? My orders always seem to be in the 000s, especially when they have free shipping! :laughing:

@Tyler: I highly suggest you do not persist in the filenaming convention you are using. The uses of pipes, |, and dollar signs are reserved characters in Unix. Though your Mac may allow it, it could hamper automation efforts downstream. (Note: I didn’t say, “completely stop”, but it is something that could frustrate your attempts.) Also, these characters can hinder crossplatform transport of your files.

Just some food for thought.

The automatic renaming of .eml files to the contents of their Subject: line happens for indexed files, too, not just when you import them. I find this very annoying, as I also use well chosen file names for my .eml files, and even worse, keep many of those in an external folder tree which is under version control (svn), so the automatic renaming screws things up big time.

So IMO this behavior should be considered a bug, but at least it ought to be configurable.

HOWEVER, I was able to find a workaround which works for me: If you set the respective files to read-only (e.g. using “chmod a-w file.eml” inside of prior to indexing or importing them with DTPO, the file names will be left alone. And since DTPO remembers and respects the attributes of files entrusted to it, your .eml files will survive multiple import and export operations with the file name staying the same as long as you don’t set them back to read-write yourself.

(Perhaps the “locked” state may also work, but read-only suits me better so I haven’t bothered testing this.)

Like most users, I consider naming emails by the Subject a feature, not a bug. It’s generally a convince for archived messages.

It would be possible to make this a Preferences option, although that would introduce more complexity , in Preferences and in scripts. So the odds are that the current behavior will continue unless you can attract considerable support from other users for a change. :slight_smile:

Hi Bill,

Well, I can live with the workaround that I found (setting the files to read-only before indexing or importing them), so I won’t file a bug report for this.

I have no doubt that this feature is well intended, but please note that DEVONthink is acting inconsistently here since the names of all the other file types are preserved — and being consistent, predictable, and “orthogonal” (meaning that features can be combined in all imaginable ways) is one of the big virtues of DEVONthink otherwise.

So I just ask you to reconsider this case, at least for indexed documents. This renaming breaks the assumption that indexing will preserve a complete file system tree as-is, and hinders the interoperability with 3rd party apps that indexing is supposed to guarantee. (In my case: using DTPO on a directory tree that is under version control.)

This is also a case where I guess DTP acts differently than DTPO, which may not be desirable if you want DTPO to be a compatible, just more feature rich drop-in replacement for DTP.

So the choice is yours.

All the best,
Arndt from Germany

I note your philosophical points, with some sympathy. Yes, it’s true that DEVONthink Pro Office manages the Names of email messages differently than other document filetypes.

But the conventions used by DEVONthink Pro Office in capturing email messages is to maintain the names of messages as they are presented in the mail client (the Subject), as well as the Sent date.

Especially for those who maintain “conversations” in their email archives, that’s critical information.