Repl.(3 ) Add an option "Form" [0] to [0]

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Repl.(3 ) Add an option "Form" [0] to [0]

Postby awingheart » Sun Feb 06, 2011 5:22 pm

Repl.(3 ) Add an option "Form" [0] to [0]

LIKE

123_456_789.TXT ---> 123 456_789.TXT
124_456_789.TXT ---> 124 456_789.TXT
125_456_789.TXT ---> 125 456_789.TXT

:oops:
awingheart
 
Posts: 3
Joined: Sun Feb 06, 2011 5:14 pm

Re: Repl.(3 ) Add an option "Form" [0] to [0]

Postby awingheart » Sun Feb 06, 2011 5:29 pm

like
Repl.(3 ) "Form" [1] to [5]

123_456_789.TXT ---> 123 456_789.TXT
1244_56_789.TXT ---> 1244 56_789.TXT
12545_6_789.TXT ---> 12545_6_789.TXT
awingheart
 
Posts: 3
Joined: Sun Feb 06, 2011 5:14 pm

Re: Repl.(3 ) Add an option "Form" [0] to [0]

Postby Stefan » Sat Feb 12, 2011 4:34 pm

You can use regular expressions for this issue.

RegEx(1)
Match: ^(\d{1,5})_(.+)$
Repla: \1 \2


Explanation:

^ => look from start of string
(\d{1,5}) => match one till five digits
_ => following by an underscore
(.+) => and the rest of string
$ => till string end

\1 => will replace the matched 1 till 5 digits
    => instead of the underscore we replace with an blank
\2 => will replace with the matched rest of the string



(\d{1,5})_ => match one till five digits following by an underscore
will only match and rename files which have one, two, three, four or five digits followed by an underscore at the begin like
123_456_789.TXT ---> 123 456_789.TXT
1244_56_789.TXT ---> 1244 56_789.TXT
12545_6_789.TXT ---> 12545_6_789.TXT

but not
125456_7_89.TXT ---> 12545_6_789.TXT
because that are not 5 digits following by an underscore but six digits.


HTH?
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: Repl.(3 ) Add an option "Form" [0] to [0]

Postby awingheart » Sat Feb 26, 2011 4:17 pm

thank you very mach
awingheart
 
Posts: 3
Joined: Sun Feb 06, 2011 5:14 pm


Return to Suggestions