11 Vote

Delete all Characters up to a certain Character from File Names

Question by Mail Request | 2021-03-23 at 09:27

I would like to delete all other characters from the name of a file up to a certain character (example -).

Before: abc-def.ext
After:  def.ext

Is that possible somehow?

ReplyPositiveNegative
Avatar
1Best Answer1 Vote

That is possible with the File Renamer, for example with regular expressions:

In the Search and Replace function:

Search for:   .*?\-(.*)
Replace with: $1

And don't forget to tick the box next to "Interpret  as regular expression".

Important: Since the minus sign - is a character with special meaning within regular expressions, we write \- to escape the character. If this is not the case, for example if we want to delete everything up to an x, the following is sufficient: .*?x(.*)
2021-03-23 at 15:24

ReplyPositive Negative
Reply

Related Topics

Rename File to its Folder Name

Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.