Multi-rename to replace characters reading right to left

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
gquiring
Junior Member
Junior Member
Posts: 27
Joined: 2003-02-07, 17:27 UTC
Location: Summerville, SC

Multi-rename to replace characters reading right to left

Post by *gquiring »

I have a lot of file names where they use dashes. I would like to remove everything past the last dash in the filename. Example:

01 - description title -12345.mp3

I want to remove the -12345 part. So the file name would look like:

01 - description title.mp3
User avatar
Dalai
Power Member
Power Member
Posts: 9966
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Multi-rename to replace characters reading right to left

Post by *Dalai »

This should work.

Search for:

Code: Select all

(.+)\s*-.+
Replace with:

Code: Select all

$1
[ ] E
[X] RegEx

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply