DonationCoder.com Software > Post New Requests Here
Chop off extra junk in file names
AbteriX:
Please note that Nicholas don't want to remove the last underscore, e.g. there are only 4 signs to remove.
nkormanik:
Thanks AbteriX for pointing that out. Yes, I want the last underscore to remain.
As for what's between the last underscore and the period, it's variable -- from one to six digits. That's really the crux of the problem. The 'junk' varies in length. Need to cut out that junk.
Probably a magic RegEx code is called for. Look forward to the RegEx gurus coming back with updated code (sorry I made the mistake about which underscore...).
jgpaiva:
Hi, for ReNamer to keep the last underscore, you can use: (_.*_).*
AbteriX:
Nicholas, since the RegEx differs from tool to tool,... do you have an favorite now?
An RegEx for scarabee's Siren Renamer would be:
%b(s/(.+_).+/$1/).%e
- - -
Note that you can use also f.ex. den4b's ReNamer with an Rearrange Rule like this:
FROM:
_50501_22004_22404_3000.png
or
_50501_22004_22404_300012345678.png
TO:
_50501_22004_22404_.png
USE:
ReNamer Rearrange Rule:
Split by delimiters "_"
New pattern "$1_$2_$3_$4_"
(skip extension)
See > http://www.den4b.com/wiki/ReNamer:Rules:Rearrange
Also note that ReNamer has an Analyze Dialog to test such issues without the need to have the file names in real on your disk:
http://www.den4b.com/wiki/ReNamer:Analyze
nkormanik:
den4b's ReNamer looks really good. I still would like to try the others, though.
Navigation
[0] Message Index
[*] Previous page
Go to full version