A handful of sweet freebie tools to save the day
Tuesday, 16 March 2010
It so happens that my employer has made a most welcome decision to replace the aging creaky old Novell GroupWise mail software with Microsoft Outlook, joining the rest of the modern corporate world. Now, there is little love in my heart for GroupWise, but it does have one feature that the new Outlook configuration will lack: you can keep as many emails as you want, just like Gmail.
The problem is this: with Outlook we will be limited to 1000 messages in our in-box; sadly, many of us have tens of thousands of emails in our old GroupWise mail. Even after a fairly rigorous slash and burn mission, hacking out all of the low hanging fruit, there will be many thousands remaining and I don’t want to lose that information. It might be useful to search and find how I set up a Zebra bar code printer in 2003, no?
A bundle of different freeware glue tools came to my rescue. Read on to hear about the toolset that has made it so I can keep those messages for years to come.
Possible Solutions
Right out of the gate, I began looking for ways to migrate messages from one mail client to the other. Some apps have this built right in, and if not, there are scripts and utilities out there to do this; but I was hampered by a few key facts:
- I have no control over the email clients and their configuration. Even if there is a menu option for exporting GroupWise messages from version 7.2, I’m stuck at 6.4 and cannot use that option.
- GroupWise is a minor player in the email world. I’m not sure if Outlook would import from GroupWise, but I doubt it.
- They are replacing the client in one shot. There will be no interim period where both GroupWise and Outlook will be available.
- There is no getting around the hard limit of 1000 messages.
- I don’t want to spend money on this.
With these constraints in mind, I immediately thought about PDF documents. I then considered the following questions:
- How do I convert my email to PDF?
- How can I do this automatically with thousands of emails?
- Once I’m done, how do I search these documents?
Here’s what I did:
Conversion to PDF
The first part was easy. I downloaded one of the many free print-to-PDF products available.
I chose PDFCreator, because I am familiar with its use and I know that it does not munge the fonts.
Like many other PDF generation utilities, PDFCreator functions by providing a virtual printer to which any application can print. For example, to make a PDF of a web page, you use the Firefox Print menu and select PDFCreator from the drop-down list of available printers.
You are provided with a list of metadata fields that you can fill in, and these fields are used in the PDF generation.
Here’s what the PDFCreator screen looks like:
A word of caution: PDF Creator is free, but you must be careful to deselect their spammy toolbar options in two different places during the installation process. I don’t like software that comes with preselected toolbars to install (even nice ones like Google’s) because I’m certain that 95% of the folks who actually install the toolbar would never have chosen to do so if it were unchecked by default.
Running Everything Automatically
This was the interesting bit. I work with Windows machines at work, so there was no AppleScript option available. So I did the next best thing: I used AutoIT.
I will warn you that AutoIT is pretty much the Windows analog of AppleScript, without the cutesy pseudo English syntax. In other words, you will need to roll up your sleeves and get your hands a little dirty in order to put together a decent AutoIT script.
The payoff comes when you finish your work and compile it into a tight executable that you can share with your friends, allowing them to automate some complex series of button clicks and copy/paste operations.
I walked through the manual process of exporting an email to PDF and listed each action:
- Get the date, sender, and subject
- Create a filename based on date + sender + subject
- Launch the Print dialog
- Select PDFCreator
- Fill in the Document Title, Creation Date, and Subject in the PDFCreator dialog
- Fill in the full file path in the Save dialog
In addition, I wanted to make the script a little better by adding the following:
- Check that user has PDFCreator installed
- Verify that GroupWise is running and that the user has selected one or more messages
- Prompt the user for a target directory before processing the messages
- Sanitize the filenames by replacing illegal characters with underscores and truncating to meet maximum filename and path length in Windows
- Skip over files that have already been generated, quickly, so that one doesn’t need to worry about accidentally selecting messages that were already printed
There were other adjustments needed, but the process was the same: run the script, hit a problem, tweak the script a little to address the problem, and repeat.
Here’s a little bit of the AutoIT script:
You can see that it is a bit more intense than AppleScript, but remember that the full script wasn’t written in one go. I had a little short ten-line script that I kept tweaking as small problems cropped up until I had adjusted things to my liking.
Note that this is a GUI macro language. The machine starts clicking and typing away right in front of you and you probably shouldn’t interfere until your script finishes.
As of this afternoon, I have generated around 4,000 PDF documents for my email messages.
Searching All of Those Documents
This was the easiest part. These days there is an excellent tool available for searching documents on your desktop: Google Desktop. This product indexes every useful file on your desktop and provides a full Google search with a quick double-tap of the <control> key.
So you can enter a search like “Zebra bar code”
And the results look exactly like a Google web search, but it’s showing your desktop files. And you can see inline previews too.
Macintosh users can install Google Desktop as well, but all of these files should already be indexed and searchable by Spotlight.
Closing Thoughts
Whenever I reach for tools like this I feel a twinge of guilt—it’s outright hackery, isn’t it?
But there is a place for quick and dirty jobs in every workplace. I needed to get my files from one place to another, one time only. It just didn’t make sense to spend money or time on a more elegant solution.
Play around with each of these tools a little. Especially AutoIT—it’s a handy Swiss Army Knife to have at your disposal.