How to delete last x number of characters from filename?

I’m trying to make sense of the functions of Krename. Is it possible to delete characters from the end backwards a set number of spaces? For instance how would I set the app to rename the following input file to the following output?

Awesome file name 01 - [fdsakfha].mp3
Awesome file name 01.mp3

The solution to the problem you listed is:

File name: [1-[length-14]]

What that does, is:

  • [ – opens the command
  • 1- – means use all letters starting with the 1st one; and go all the way to
  • [length-14] – takes the length of the whole file name (without extension) and subtracts 14 (the number of characters you wanted to remove); so the list of characters to be kept will end 14 characters before the end of the old file name
  • ] – closes the command

You can find other useful commands if you click the round :information_source: icon in KRunner.

Thank you for explaining that. I’ll check out the info section too.

1 Like