Lotus Notes Mail Exporting – add a feature, add a bug!

With v0.8, I added the feature “don’t create the same attachment, in the same attachment folder, if it already exists.”

And I added a bug.  The bug would crash LNME when this happened:

Find duplicate attachment file name Extract the new attachment to the %temp% directory.

It would crash if the “new” attachment [...]

Lotus Notes Mail Exporter v0.8

Yesterday, I talked about file hashing in Visual Basic.  There was a reason, and that was that I updated my Lotus Notes Mail Exporter program with some limited duplicate attachment checking.

Limited because it’s simple.  Simple as in:

check to see if a file attachment with the same name already exists. if [...]

Duplicate files and hashing in Visual Basic.

Duplicate file detection is fairly easy to do, as it turns out, and it goes like this.

  1. Read first file.
  2. Calculate a unique fingerprint, and store the fingerprint.
  3. Read second file.
  4. Calculate a unique fingerprint, and compare the fingerprint to the first files’ fingerprint.
  5. If they equal, the two files are duplicate files.

One way of doing this fingerprinting is to use a hashing algorithm, such as MD5 or SHA-1.  A hashing algorithm should give you a unique fingerprint for each file.  The snippet of code to do that, which I borrowed from the Visual Basic Knowledgebase is below the fold.

Now there are applications, such as DiskState, which scan your hard disk for duplicates by using MD5 hashing.  But they do this:

  1. Read first file.
  2. Do While we have a file to read
       Calculate a MD5 Hash, and store that value in a list, alone with the filename and location
  3. If we have another file, go back to 2.
  4. At this point, we’ve checked all the files on hard disk. 
       Now search though the list, and do we have any hashes that are the same?
  5. If we do, we have duplicate files.

Why do I need to know how to detect duplicate files?

Well I was updating the Lotus Notes Mail Exporter program the other day, and decided to implement some duplicate attachment file checking.  I’m not sure if I’m that happy with how I’ve implemented it, time will tell.  It does give me an idea for some other programs …


(Click here to continue reading Duplicate files and hashing in Visual Basic.)

Sew me a Thread or three.

Threading, simply put, is a way for your program to do multiple things at once.

Sort of like driving and talking on the cell/mobile phone at the same time.

Yes you can do both, but they can cause bad things to happens.  Like driving through red lights, or having your computer freeze on you.

[...]

Lotus Notes Mail Exporter – writing into Outlook looks hard.

Which is why I purchased the Outlook 2007 Programming book.

To import messages into Outlook, what I need to do is set the Outlook Sender field to something other than “me”.

Why?  Well I’m trying to import messages from Lotus Notes, and I want to copy the Lotus Notes “From” field into the Outlook [...]

I don’t know how they got a TAB into the filename,

but they did.

Had a report from a user of LNME, that LNME was producing an error message, then crashing.

The cause that an message attachment had a TAB character in it’s filename, and Windows wouldn’t accept that, so it would error. (how the TAB got into an attachment name is another question… [...]

v0.6 is out the door: Lotus Notes Mail Exporter

The major change is that LNME now supports exporting messages from a particular date.

Date to export from Why Sunday, 1 January 1989? Lotus Notes 1.0 was released in 1989, and I’m making the assumption that you won’t have messages older that.

Delayed Write Errors If you get “Delayed Write Errors” from [...]

Lotus Notes Mail Exporter

is a small program I’ve written to export attachments and emails from the Lotus Notes email client.

Now there are commercial programs which can do the same thing, but since I had a little time on my hands, I wrote LNME.  Learnt a bit about Lotus Notes programming at the same time.

It’s [...]

Programming Lotus Notes with Visual Basic – much is wrong.

Much of what is out there is plain wrong, which is not surprising.  Of the stuff which does work, it’s poorly documented.  That does not surprise either.

Here are a couple of pointers for novice Lotus Notes/Visual Basic programmers.

Lotus Notes and Domino 6 Programming Bible Get a copy of the Lotus Notes [...]