1

I have multiple files with different names that are of different length. This time, I want to use Powertoys PoweRenamer to strip specifically the last 12 characters of each file name. For this particular set of files, those last 12 characters are all different on all the files with the exception of the first character that is a dash or minus sign (-), in all of them, but I also will like to know what expression I have to use if in the future I need to strip a different number of characters with no character in common.

Regards.

Hennes
  • 64,768
  • 7
  • 111
  • 168
3d1l
  • 323
  • 1
  • 7
  • 21

1 Answers1

2

Assuming you want to change the file name but want to keep the file extensions, you can try the following:

  • Search for: .{12}(\..+)
  • Replace with: $1
  • Check Use Regular Expressions

The above applies to Filename + Extension. If it should apply to Filename only, set the criteria to the following:

  • Search for: .{12}$
  • Replace with: Leave empty
  • Check Use Regular Expressions

Change the 12 to the number of characters you want to remove.

Filename + extension Power Rename - Regex query & Results for filename + extension

Filename only Power Rename - Regex query & Results for filename only

Reddy Lutonadio
  • 17,120
  • 4
  • 14
  • 35