PowerShell: A Simple Batch Processing System, Part 1

batchHi.  I’ve written a few scripts that have gotten to be quite large.  In all cases they’ve needed to make a series of changes to a set of objects and log the results.  It’s normally important that some of the later changes only get made if the earlier ones are successful;  for example only changing the default SMTP address on a mailbox if another SMTP address was added earlier.

This series of posts will go into a decent system I’ve found for accomplishing this with some skeleton examples that are (hopefully!) easy to adapt. Continue reading “PowerShell: A Simple Batch Processing System, Part 1”

PowerShell: Converting PDF Bank Statements to PDF

I wrote some very quick and dirty code to import American Express PDF statements to CSV here.  I could export the PDF to TXT and then process the text file with PowerShell.I had to revisit it the other day as I had a raft of PDF statements to convert and import into YNAB (and not just from AMEX).

Of course, all the bank and credit card vendors use a standard PDF format for statements so it was easy.

Right?

No, actually pretty much everyone just does their own thing.  And by ‘own thing’ I mean PDFs that are not even consistent within themselves.

So:  the joy of regular expressions. Continue reading “PowerShell: Converting PDF Bank Statements to PDF”

Converting American Express PDF Statements to CSV with Powershell

Gah.  Importing accounts into accountancy programs can be tedious.  What makes it more tedious is when banks make life even more difficult.  American Express allows you to download statements in nice CSV formats though.

Yay!

Except if the statement is older than 6 months, then you have to download it as an non-formatted PDF.

Boo.

Continue reading “Converting American Express PDF Statements to CSV with Powershell”