Hi Georges,
i guess your "expr3" is not always the same chars? Would be to simple.
The trick is to find something what is common with all this different file names,
if we didn't find something common we have to first separate the files we need or do it in several passes.
But i see one common thing: (expr3) is always at the end of the file name....right?
So we search for:
The base file name: %b
start an regEx: (s/
all in front: (.+) Group () 1
but no opening bracket (: [^\(] not needed here! ... don't know why!
till an opening bracket (: (\() Group () 2
all: .+ an another group, what we need not longer so we didn't use ( and ) here
till an closing bracket: (\)) Group () 3
the rest if any: (.*) Group () 4
end the regEx search: /
do the replacement: \1\2\3\4 replace whit what we have found with Group 1, Group 2,...
end the regEx: /)
add an dot and the ext: .%e
So i would do with Siren 2.0
Expression: %b(s/(.+)(\().+(\))(.*)/\1\2\3\4/).%e
HTH? :-)
What is that with those [1] thinggies? I didn't understood. You want them or not?
And you didn't mentioned
"expr1 (expr2).ext"
and
"expr1 (expr2) [1].ext"
this would also be affected and deleted with my RegEx.
I guess you have to put your files you want to rename apart first?
Or rename your "expr1 (expr2).ext" first to e.g. "expr1 [expr2].ext" and later back.
It's hard to guess without you provide some real file names. (If you do this make an list with one name at an row only, and without comments or quotes please, so i can copy them at easy and create files with this names. See http://scarabee.software.free.fr/forum/ … hp?id=187)