-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jeremy Turner
On Thu, 2005-04-28 at 17:44 -0500, Gerald Combs wrote:
Before I start rolling my own solution, does anyone know of
a utility or
collection of utilities that will
- Extract all of the MIME attachments from a mailing list archive,
You might check out uudeview or mpack http://www.fpx.de/fp/Software/UUDeview/ No URL for mpack. In the Debian package, the author says of mpack says to use uudeview.
- Extract the files from any archived (tar|zip|rar|...)
attachments,
I assume once you extract the files from your mail archives and remove any duplicates, it would be trivial to run a loop on all files you extracted:
<pseudo-code> if $extension eq ".tar.gz" or $extension eq ".tgz" then tar xvfz $filename else if $extension eq ".tar.bz2" or $extension eq ".tbz2" then tar xvfj $filename else if $extension eq ".zip" then unzip $filename end if </pseudo-code>
- Move each extracted file to a specific directory, renaming it if there's a naming collision, and
uudeview does this.
- Remove any duplicate files.
Maybe an MD5sum hash table to check for duplicates?
Jeremy
Wouldn't you want to check for dups. before you extract and mv to a dir? Or extract to dir., compare to final destination dir. And then mv file. You may want to compare filenames and dates to keep the newest or oldest file based on preference.