RE: [Clip] Removing attachments from Outlook Express email
- Hi Dick,
Although I do not use OE frequently, it is better than Outlook for these
kind of tasks because of the plain text format of the messages.
For more information on the internals of OE pay a visit to
A couple of weeks ago I just wanted to do the opposite from what you are
trying to achieve. I exported my messages to OE, dragged them into a folder
and dragged them to UUD32win.exe to just get the attachments out of them.
Since I still had the original messages in OE I had something available to
try to write something the other way round. I'd not try to use the Keyboard
KEYS for this, unless you are really sure what you are doing. And this is
If you're ready (or rather, if the clip is finished), you can simply make a
new folder in OE and drag the resulting files there. Before you start your
clip, just drag the .eml files to a folder (default here is
I used OE 6 for this and it worked. Tweaking may be necessary.
^!If ^%NR%>^%NrofFiles% END
^!Set %breakAt%=^$StrPos("Content-Type: application/";"^%FileContents%";No)$
^!IF ^%BreakAT%=0 LOOP
^!TextToFile "^%emailfiles^%NR%%" ^%FileContents%
> -----Original Message-----
> From: Dick Gascoigne [mailto:dick.gascoigne@...]
> Sent: Wednesday, December 04, 2002 10:43 PM
> To: email@example.com
> Subject: Re: [Clip] Removing attachments from Outlook Express email
> Alan C. -
> Thanks for the clip. That is good for opening each of the
> .eml files in OE's
> viewer. From there I can use File:Move to Folder to actually
> get it into
> OE's database. But that has to be done one by one, as I view each.
> It is handy perhaps to view each attachment-stripped email
> before I re-store
> it, but I'm hoping to automate the re-store process.
> I think I'll play around with simulating keystrokes with NTP
> so that the
> Move to Folder command in OE happens automagically, as each message is
> loaded into the viewer.
> (All messages will come from / go to either the Inbox folder,
> or a folder
> I'll designate just for email to be stripped.) I don't quite
> know how to do
> the keystroke simulation, but I'll start by checking the
> archive here ! Jody
> has explained it once or ten times, I think.
> I still haven't quite got the clip that will strip out all attachments
> (everything but the "Content-Type: text/html" section, I think).
> Dick Gascoigne
> > >Is there any way to get the exported file directly into
> OE, rather than
> > >manually dragging it?
> > The next, not directly. But it launch them, the .eml
> files. I forget
> what to do after that. been a while since I did it. It
> gathers, loops,
> launches each .eml
> > I used to launch near 5 to 8 to 10 .eml files then get them
> back into OE.
> But not too difficult to get them into OE. I've not a clue
> if it of benefit
> to you or not.
> > ; notetab document folder path
> > ^!Set %Files%=^$GetDocumentPath$
> > ^!SetListDelimiter ^p
> > ^!SetArray %FileList%=^$GetFiles("+^%Files%";*.eml)$
> > ^!SetArray %FileList%=^%FileList%
> > ^!Set %Count%=^%FileList0%
> > ^!Set %Index%=0
> > :Loop
> > ^!Inc %Index%
> > ^!If ^%Index% > ^%Count% End
> > ^!Shell "^%FileList^%Index%%"
> > ^!Delay 5
> > ^!Goto Loop
> > ; ---end clip
> ------------------------ Yahoo! Groups Sponsor
> Get 128 Bit SSL Encryption!
> Your use of Yahoo! Groups is subject to
- Here I am again, Dick,
I opened the resulting .eml files by doubleclicking so I assumed they would
work (no attachment-indocation in the email itself).
I just dragged the files to OE to see how they would appear there. There
still are paperclips in front of the messages in the index (and that would
have to do with the exact contents of the file stating something about
multipart/mime etc. If you want to get rid of the paperclip you will need a
little more processing, I guess,
- Last time,
If you remove the last two lines from the resulting emailmessages it appears
to work correctly (no paperclips). You can automate that as well, obviously.
This remainder needs to be thrown away as well, but I didn't want to dive