connor flynn

connor@connor-flynn.com email

resume download

Rename Script


This was just my first jumping in to PowerShell and fixing a problem I had with a repetitive task. One of our regular tasks requires renaming files to match a vendor's file naming parameters. Since PowerTools is not allowed on our computers, we used Irfan to rename things, but the way I was taught it was manually done with a few steps. The entire process was removing 0's and changing a '-' to '.'. I was able to do this in Python, but our computers are locked down and do not allow Python scripts to be run. Turns out PowerShell scripts are also not allowed, BUT I can copy and paste a script from a text file into a PS window without admin... This gets into my stance on security rules that are easy to circumvent but a massive headache because they are used frequently. Back to the point, even with the copy-paste steps, it was still faster than doing all the steps in Irfan and was faster than waiting for PowerTools to be eventually installed.