Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have hundreds of EML files which are single emails with attachments.

I would like to use scripting to get the attachments, that's why I'm looking for a way to extract any attachment from a single EML file in a command line.

I could parse each file to look for the attachment and use a base64 decoder on that, but I hope that someone has already written this.

Any recommendation?

share|improve this question
Tool requests are considered off-topic: – Ƭᴇcʜιᴇ007 Aug 7 '13 at 16:28
up vote 5 down vote accepted

You can try use:

  1. mpack(Windows version of mpack/munpack using the version 1.6 source obtained from

  2. B64Dec tool(command line supports).

share|improve this answer
Just would like to chip in that munpack works great for Unix enviroments. – Dropped.on.Caprica Oct 16 '14 at 14:18
munpack tells me Did not find anything to unpack for a .eml that contains 2 attachments. – Nicolas Raoul Oct 27 '14 at 6:39

Bit of a plug, It take input of .eml files in a directory, then it will iterate over these and output them to a destination folder.

It runs on Java.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.