Nuttiness enumerated below:

  • UPDATED: Misinformation removed--the PowerShell Book has set me straight. Inside a PowerShell function, all method calls returning a value must be prefixed with [void]. This means mostly .NET method calls and COM object methods. If you don't use the [void] prefix, your $xls.ActiveWorkbook.Save() operation returns a COM object to the calling function, not exactly "expected behavior." The behavior isn't a problem now that I know.
  • The file redirection operators (in my case, the >> append operator) output in Unicode by default. This is fine, except that I was appending to an ASCII file. Whoops! The (working) code ended up as:
    #not exactly as quick and easy as "string" >> $outfilename, but at least it exists
    "string" | out-file -filepath $outfilename -append -encoding "ASCII"


    Footnote: the PowerShell Book also covered this specific scenario.
  • mp3info is what I'm using to catalog my podcasts (I'm really just looking for the total run time, and maybe encoding bitrate), and it looks like it's going to work most excellently. What's awesome about PowerShell is that it can easily import CSV or XML (both formats may be outputted by mp3info), but I could have also used a .NET library that reads MP3 files. In this case, (i.e., today,) it was slightly easier to run the console application and parse its text output in PowerShell. Tomorrow, I may use an available .NET (or COM) library. The brilliance of PowerShell is, either way is quite easy.

    Footnote: the PowerShell Book also covered text file parsing and handling XML documents. Yeah, definitely recommended.

Update: looks like I've got ~372 hours of podcasts in the queue, weighing in at 12.5GB at an (unweighted) average bitrate of 84kbps in 679 files. Yeah. A new Great Podcast Roundup to follow soon.