Today I needed to move 435 TIFF images from the San Marcos Daily Record Negative Collection into folders based on a section of their filename.
In my last post, I rotated 12 images with non-contiguous filenames like 91, 115, 185. This time, though, I have a set of images with contiguous filenames so I don’t need to type each one in by hand.
I rotated the images with ImageMagick version 6 in Cygwin’s BASH Shell using 1 line of code.
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.