Rename (trim) multiple file names
PowerShell command
Use a simple PowerShell command combined with regular expressions (RegEx). Without or with a different file extension you have to adapt the back part for your needs.
Explanation RegEx:
_ matches the character _
\d matches a digit (equivalent to [0-9])
+ matches the previous token between one and unlimited times
_ matches the character _
\. matches the character .
txt matches the characters txt literally (case sensitive)
Use the -WhatIf
parameter on Rename-Item
to check renames in order to avoid a mistake.
Further solutions with graphical user interface
Bulk Rename Utility allows you to easily rename files and entire folders based upon extremely flexible criteria.
Ant Renamer is another free program that makes easier the renaming of lots of files and folders by using specified settings. It supports Unicode names.