Hi,
1)
you are in the wrong sub-forum. This is BRU, not BRC. Please take care next time.
2)
BEFORE/Current:02665T-01-WAM750-Getting_Started-XU-A5-0218-1.jpg
[WAM750_WAM751]XU-ENG-0731-1.jpg
Mutiroom_ENG-0609-1.jpg
shapem7um-1.jpg
WAM750_WAM751XU-ENG-0520-1.jpg
AFTER/Wanted:02665T-01-WAM750-Getting_Started-XU-A5-0218.jpg
[WAM750_WAM751]XU-ENG-0731.jpg
Mutiroom_ENG-0609.jpg
shapem7um.jpg
WAM750_WAM751XU-ENG-0520.jpg
USE:- Code: Select all
brc32.exe /PATTERN:*.jpg /REPLACECI:-1:
My guessing is, the extension is just not taken into account here at all.
So just work on the base name part only
- Code: Select all
X:\BRC-removePattern>brc32.exe /PATTERN:*.jpg /REPLACECI:-1:
Processing Folder X:\BRC-removePattern\
Filename 02665T-01-WAM750-Getting_Started-XU-A5-0218-1.jpg would be renamed to 02665T-01-WAM750-Getting_Started-XU-A5-0218.jpg
Filename [WAM750_WAM751]XU-ENG-0731-1.jpg would be renamed to [WAM750_WAM751]XU-ENG-0731.jpg
Filename Mutiroom_ENG-0609-1.jpg would be renamed to Mutiroom_ENG-0609.jpg
Filename shapem7um-1.jpg would be renamed to shapem7um.jpg
Filename WAM750_WAM751XU-ENG-0520-1.jpg would be renamed to WAM750_WAM751XU-ENG-0520.jpg
X:\BRC-removePattern>
- - - - - - - - - - - - - - - - - -
To be sure to replace only at end of file name, utilize Regular Expressions:
FROM:
RegEx-1 Test.ext
RegEx-1 Test2-1.ext
RegEx Test-1.ext
TO:
RegEx-1 Test.ext
RegEx-1 Test2.ext
RegEx Test.ext
USE:
- Code: Select all
/REGEXP:<Match>:<Replace>
brc32.exe /PATTERN:*.jpg /REGEXP:(.+)-1$:\1
- Code: Select all
X:\BRC-removePattern>brc32.exe /PATTERN:*.ext /REGEXP:(.+)-1$:\1
Processing Folder X:\BRC-removePattern\
Filename RegEx Test-1.ext would be renamed to RegEx Test.ext
Filename RegEx-1 Test-1.ext would be renamed to RegEx-1 Test.ext
Filename RegEx-1 Test.ext requires no changes
X:\BRC-removePattern>
Instead of:
- Code: Select all
X:\BRC-removePattern>brc32.exe /PATTERN:*.ext /REPLACECI:-1:
Processing Folder X:\BRC-removePattern\
Filename RegEx Test-1.ext would be renamed to RegEx Test.ext
Filename RegEx-1 Test2-1.ext would be renamed to RegEx Test2.ext
Filename RegEx-1 Test.ext would be renamed to RegEx Test.ext
X:\BRC-removePattern>
HTH?