I have a few hundred files in file explorer that I am looking to rename.
All of the files end with a set of 2 characters after the extension. EX: 23RH1.JPG;1
Is there a way to batch rename all of the files by removing the last 2 characters from all of the file names? Or maybe a Powershell script I could run that would auto remove last 2 characters from end of all the file names?
Thank You in advance
so far i have tried running something along the lines of
get-childitem *.JPG | rename-item -newname { $_.fullname.substring(0,$_.fullname.length-2) + $_.extension }
and
gci <dir path \*> |% {rename-item $_.fullname -newname $_.basename -whatif}
Unfortunately my PowerShell knowledge is quite limited and I'm not really sure how to mass rename a ton of files at once as its a fairly new tool to me.
Huge thank you to anyone that could offer any help or advice.