Batch-scraping email jpgs
August 5, 2018 8:20 PM   Subscribe

My sister lost family photos in the Redding fire. I have some on email. How to collect them so to give her copies?

My sister lost a box of family photos in the Carr fire. But she scanned and emailed various ones to me over the years. How can I comb through my emails and copy the photos to one folder so that I can give them back to her? Is there some batch command I can use? The photos reside as attachments in Outlook on my PC running Windows 10 Office 365. Duplicates also exist on the Yahoo email server.
posted by mono blanco to Computers & Internet (5 answers total)
 
To be honest, I suspect that it will probably be easier for you to do searches for your sister's email address within your various email systems and any sort of filtering that you can do for an attachment being present will help; then manually save the photos OR just forward the emails back to your sister for her to go through.
posted by k8t at 9:29 PM on August 5, 2018


Best answer: Are the emails all in your Inbox? If so, I would search for her addresses and move all emails to/from her to their own folder. Now you can sort the messages by size to see how many there are. You may also want to sort by attachment (the paper clip in the header row) if she always attaches them and does not insert them directly into the message.

There are macros that will do the extraction part and here is one example, but it is from 2010.

If you can do it one at a time, you can copy and paste attachments from the reading pane into a folder. If I was doing this, I would set up a second folder and move each message there with a Quick Step after I copied the picture.
posted by soelo at 7:45 AM on August 6, 2018


First, don't worry. This is a SMOP (Simple Matter Of Programming) that I've done dozens of times before... just not on Windows.

Get your sister's emails all into one folder. Things that came from her, things that were sent to her, things that she was Cc:'d on.

Then you use IMAP to download that folder into a 'mbox' (or 'maildir') formatted mailbox. Then there are programs that will extract every jpg/png/doc/etc from that download into a single directory. I've done this over gigs of emails covering decades... you won't believe the random cruft that come out of "extract all things from all emails from the past 10 years".

About once a year I download all of my mother's emails from gmail and extract her husband's "Daily Devotional" messages and turn them into a Word document and a PDF ('cause some people want book-like things). Granted I know their username/password and just download all their mail and have a script that does all the work...

You need to get your sister's emails into a folder. Then find a way to download (but not delete!!! the emails) that folder to your Windows machine in a bog-standard mailbox format. Then the rest is relatively easy.
posted by zengargoyle at 5:37 PM on August 6, 2018


I believe Windows 10 now has the ability to run Ubuntu Linux side-by-side. I haven't played with this (no Windows machine). If you can figure that bit out... you use 'fetchmail' to download via IMAP the folder of your sister's emails, then you use 'ripmime' to extract all of the jpg/png/gif/doc/etc into a single directory. PRESTO! Assuming Windows/Ubuntu integration is decent, you open up Explorer on that directory and pick out the pictures you want to keep / send to your sister.
posted by zengargoyle at 6:12 PM on August 6, 2018


Response by poster: Thanks. I basically followed soelo's suggestion. Sorted by name & attachment, that caught most of them. Then another sort by name and size just to catch any where the pic was embedded in the email.
posted by mono blanco at 8:12 PM on August 8, 2018


« Older Where to go walking in Britain?   |   How much old caulk to remove? Newer »
This thread is closed to new comments.