Archive

Archive for the ‘My Software’ Category

New Software Catalog

March 11th, 2010 Fishbowler No comments

I’ve decided that WordPress isn’t the best way to publish the apps I’ve made. Attachments are all just so fiddly. For the time being, I’ve posted them at http://fishbowler.weebly.com/.
If anyone’s got any better ideas, please speak up.

Categories: My Software, Uncategorized Tags:

PowerShell: Rename files to include parent directory name

November 18th, 2009 Fishbowler 1 comment

This took me longer than it should have to figure out.
Since I couldn’t find exactly what I was looking for on Google, I’ll share it with everyone in case they need the same thing someday.

This script renames all log files within a directory to include the parent directory name.
If your files are in a folder named “WebLogs” and your logs are named “File1.log” and “File2.log”, you’ll end up with “WebLogs-File1.log” and “WebLogs-File2.log”.

I needed this to analyse a log of IIS logs from a bunch of different places. For those not familiar, all IIS Extended logs are named exYYMMDD (where YYMMDD are date tokens).

The PowerShell I used:

Param($path)

$files = @(dir *.log -Path $path -recurse)

foreach($file in $files) {
	Rename-Item ($file.Directory.ToString() + '\' + $file.Name) ($file.Directory.Name + '-' + $file.Name)
}

The Usage:

  • Save as RenameToParent.ps1
  • Run:
.\RenameToParent.ps1 -path F:\Logs

Hope this helps someone…

Categories: My Software, Uncategorized Tags:

RoyalTS – Merge two .rts files

May 29th, 2009 Fishbowler 4 comments

I’ve written a dirty little command-line application to merge two RoyalTS files. I couldn’t find anything for it on the interweb, and wanted something to merge two files daily, both maintained by different people.

Usage: RoyalTSMerge.exe <InputFile1> <InputFile2> <OutputFile>

 

Download: RoyalTSMerge

Categories: My Software Tags: ,