Skip to main content

An update to my Thunderbird TNEF script for opening winmail.dat

Back in July I blogged about Opening winmail.dat (TNEF) files in Thunderbird (on Ubuntu). Well a colleague at work has 'refined' my script so that rather than it create a folder on your desktop it simply opens Nautilus to display the contents of the attachment.

This is the new version of the script:


/usr/bin/tnef -C $LOCATION --save-body -f $1

nautilus $LOCATION
The interesting part of this script for me is the $$ - this special script variable is the process ID (PID) of the currently running script, so it makes a temporary file called winmail_<current process id>.dat. Other than that it's pretty similar to my original script apart from opening Nautilus at the end.

Now it's even easier to open and extract files from winmail.dat files!

I found out the reason for the $$ from here.

Technorati Tags: , , , ,


Anonymous said…
I love you and want your babies! Saved my bacon, many thanks. I now use this script to double-click from my Ubuntu desktop to open those darn pesky winmail.dat files.
Anonymous said…
Changed nautilus to firefox and I'm using this script in kubuntu, too.
Thank you very much