Microsoft Windows

Conditional IF statements in DOS batch files (BAT) and a little GOTO

DOS batch files are usually very simple, but it's possible to include some logic. The CMD.EXE language is pretty limited, but it works.

Cannot copy file. The parameter is incorrect.

What this probably means is you're trying to copy a file larger than 2 gigabytes. The 2GB limit on FAT32 is affecting you. The two formats to consider are NTFS and ExFAT.

An Outlook Script to Save Spam for Training Spamassassin

On the spamassassin box, set up Samba and create two shares spamassassin-spam and spamassassin-ham. I created them in /home/Spamassassin/

Windows: Migrate Files to a New Server, Windows 2008 R2 and Windows 2003

This is probably not the "best practice" but it's what I'm doing lately to migrate files between servers, desktops, etc. MS has a tool that uses DFS to migrate data and maintain UNC paths, but, whenever I see systems that map paths to physical data on Windows, I worry.

MS Outlook: Dumping MIME EML Email Files for Spamassassin Training

Here's a VBA script that I'm using to train Spamassassin from Outlook. It saves out email messages to a file server where messages are used to train the filter. The problem here is that Outlook doesn't save EML (MIME format) files. You can save messages as text, but lately, spammers have been loading messages with a lot of chaff text that looks like regular email. You can't train with that, because it might cause the filter to start mis-identifying legit email as spam.

Sysadmin Notebook

This is a collection of articles about system administration of Windows, Unix/Linux/BSD, and Macintosh computers and networks.

Fixing Phone Numbers so they Fit a Common Format

It's common to get a list of names and phone numbers in a spreadsheet or from the web, and the formatting varies. In the US, people don't use a standard formatting consistently. Lately, they have taken to making phone numbers look like domain names or ip addresses, example: 415.555.1212. This function normalizes phone numbers to look like this: 213-555-1212 x1234. The code's structured so multiple regexes are used to perform the matching, allowing for easier modification of the code. (This code was written in Excel, but should work in any VBA application.)

Cloning Many Windows 7 Computers Quickly

(I did this before learning about Clonezilla and Fog. It was all done within two days. If I were to deal with this again, I'd get Clonezilla. See: USB Booting System for Clonezilla SE, Diskless PC.)

Open Source as a Response to Microsoft's Monopoly

There are different theories on why Open Source succeeds or fails (and opinions on whether it's succeeding or failing). The most common is not a theory at all, but the idea of "giving back to the community": that companies will give away assets because they're receiving assets for free from the community. It sounds nice, but, it's a really weak idea.

Screen Scraping With wget (and Mailarchiva)

I was testing a new product called Mailarchiva, and I misunderstood the instructions. The upshot was that a mailbox full of messages was moved into Mailarchiva, and I wanted to restore them to the mailbox.

MS Outlook: Remove Duplicate Contacts

This is a pretty good de-duper based on the one posted to a forum.

VBA: Transforming XML Error Messages into VBA Errors (Raising or Throwing Errors)

This is trial code that I used to translate an error from a Yahoo web service into a COM ErrObject.

It's not real XML parsing, but good enough for this purpose. IF an error message is sent, we extract the message and then use Err.Raise to throw an error.

MS Access: Quoting Strings in SQL

I was having a real WTF moment with Access. I'd coded up an SQL query in access, and a string had a single quote in it, fouling up the query.

The SQL was something like this:

SELECT * FROM Places WHERE Name='Joe's Bar'

Obviously, I forgot to quote the string correctly. For some reason, web searches didn't really turn up much about quoting text strings in SQL statements in Access. There was a lot of code that looked like this:

sql = "SELECT * FROM Places WHERE NAME='" & name & "'"

0xe0008497 - Incremental and differential backups are not possible because Microsoft Exchange is configured for circular logging

I got this in BackupExec 10d. It probably started because I enabled circular logging.

MS Access: Geocoding and Distance Reporting

This is some code and controls that help you geocode addresses, and prepare a report of addresses sorted by distance from a point.

It's based on the Excel Geocoding Tool, but expands on it by adding a few features, including caching of calculated locations.

Addresses are stored in their own table, and are normalized a little bit, so that you don't end up geocoding the same address over. (For example, if you have 50 people at an office, that location should only be geocoded once.)

Syndicate content