Simple batch renamer for Windows 10 PowerShell

I’m currently sitting in front of one of our Windows 10 computers that does not have Cygwin or Git BASH installed so there’s no way for me to quickly rename TIFF files from command-line like I am used to . . . enter Windows PowerShell!

I need to rename the files according to the formula <filename_stub>_<###>.tif such that a file like SMDR_1950s-SF-37_May-17-2017_12-51-19.tif becomes SMDR_1950s-37_001.tif. In this case, the <filename_stub> is SMDR_1950s-37 and <###> is 001.

So I wrote a little Windows PowerShell script to help out.

Continue reading