LotusNotesHelpMeFilter
July 25, 2007 2:07 PM   Subscribe

Please help me figure out how to bulk-detach multiple files from thousands of emails in Lotus Notes 6.5.

I am currently using Lotus Notes 6.5. The email box I have just 'inherited' contains over 1600 emails with attached Word documents.

Please, please tell me that there is a way to download all of these files into one location besides individually opening each message and saving its respective attachment.
posted by mockjovial to Computers & Internet (7 answers total)
 
I'm not aware of any way to do it in the mail client directly, but you can do it with LotusScript. Some info here.

Sorry I can't help more, but it's been years since I have had the displeasure of working with that stuff.
posted by sanko at 2:53 PM on July 25, 2007


I've encountered this before with LN. The IT department did it and saved everything on a network drive. Can you ask the IT department to do it? I'm sure you're not the first there to have dealt with this.
posted by ml98tu at 3:31 PM on July 25, 2007


That script in the article that sanko linked to should work, but it's not a complete bit of code. It just does something to a document, but you have to get a handle on it first.

I'm sure someone has written a script to do this before. I'll see what I can find. As it stands, I am unaware of any way to do this out of the box without writing a script to do it.
posted by bedhead at 5:09 PM on July 25, 2007


Here's some old script from the forums on Notes.Net.

To use this, go to your Inbox and click Create...Agent.
Set the agent to run against selected documents and give it a name like Detach Files.
Change the type of agent from Simple Actions to LotusScript, then paste the code below, overwriting what's there.

Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim object As NotesEmbeddedObject
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim downloadfolder As String
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments

downloadfolder = "c:\Mail\users\"
If Dir("c:\mail",16)="" Then Mkdir "c:\mail"
If Dir("c:\mail\users",16)="" Then Mkdir "c:\mail\users"

Print "************************************************************************"
For i = 1 To collection.Count
Set doc = collection.GetNthDocument( i )
filen=Evaluate("@AttachmentNames",doc)
antalfiler=Evaluate("@Attachments", doc)
UserName=db.FileName
If Dir("c:\mail\users\"+username,16)="" Then Mkdir "c:\mail\users\"+username

Print Str(i)+" ("+Str(collection.count)+")"

If antalfiler(0)>0 Then
For filecounter=0 To antalfiler(0)-1
x=x+1
Print ( filen(filecounter))
Set Object = doc.GetAttachment( filen(filecounter) )
If ( object.Type = EMBED_ATTACHMENT ) Then
fileCount = fileCount + 1
If Dir(downloadfolder+username+"\"+ filen(filecounter))="" Then
extrachar=""
Else
extrachar=Left(doc.universalid,4)+"---" 'in case attachmnet with same name exists in several documents
End If
Call object.ExtractFile (downloadfolder+"\"+username+"\"+extrachar+ filen(filecounter) )
' Call object.Remove 'delete the attachment from document
' Call doc.Save( True, False )
End If
Next filecounter
End If

Next

Msgbox"Attachments: "+Str(fileCount )

End Sub
posted by Eddie Mars at 5:23 PM on July 25, 2007


I should have read through this code more closely before posting it. It ought to work just fine, but it's hard coded to put the files into c:\mail\users\$yourname.
posted by Eddie Mars at 5:31 PM on July 25, 2007


If you want to test this without the fear of b0rking your mail file, though the code looks good to me, do the following first:

While in your inbox, go to File-Database-New Copy*. Specify where to put the copy, then after the copying is done open the copy and do what Eddie Mars says above, in the copied mail file.

Oh, and you can modify where the attachments are stored by changing the "username" keyword to something you prefer instead, throughout the code.

*For those familiar with Notes, I recommend creating a copy instead of a replica because deletions in a local replica will eventually synch up with the server, so if something goes wrong, you could lose the whole thing. I prefer to test in a copy just in case. YMMV.
posted by bedhead at 8:59 PM on July 25, 2007


Funny you should ask this, I was just researching a product called EmailXtender today.

Apparently it can do exactly what you are after for both Notes and Exchange mail stores. I don't know much about it yet (other than the corporate site rah-rah), but a client is threatening to send us mail in this format, and I haven't even see a nybble of the functionality.

Pricing may be of the "If you have to ask..." variety (former Legato product, now merged with EMC), but if you need it, you need it.

If you do go with this, drop me a line and tell me all about it -- I'm a really lazy researcher.
posted by drfu at 1:32 AM on July 26, 2007


« Older What's the best stock photo site?   |   Looking for data on internet usage and... Newer »
This thread is closed to new comments.