Removing underscores after a specific point in a longer file

Bulk Rename Utility How-To's

Removing underscores after a specific point in a longer file

Postby lokiie1984 » Sat Mar 15, 2025 2:27 pm

All of the files have underscores instead of spaces. Where the first chunk of the name is actually a file path and the last bit is the real file name. A bunch have underscores (due to my fiddling) in the file name now and it's confusing the program. Is there a way for BRU to ignore the first half of the file name and remove only the underscores in the second part?

Example file name: CP_Bovaur_Ayrshire_Female_B_U_B_B_L_E_G_U_M should be CP_Bovaur_Ayrshire_Female_BUBBLEGUM

Thanks
lokiie1984
 
Posts: 2
Joined: Sat Mar 15, 2025 2:18 pm

Re: Removing underscores after a specific point in a longer file

Postby lokiie1984 » Sat Mar 15, 2025 2:34 pm

And I figured it right after I posted this. I found a post talking about the Name Segment section and that was exactly what I needed. I don't however see a way to remove this post.
lokiie1984
 
Posts: 2
Joined: Sat Mar 15, 2025 2:18 pm

Re: Removing underscores after a specific point in a longer file

Postby Admin » Mon Mar 17, 2025 2:43 am

Hi, yes you can use Name Segment for that.

Name Segment allows you to enter a specific segment of the filename that you want all the renaming criteria to apply to.
For example, specifying the Name Segment from 1 to 5 will restrict all the renaming criteria to just the first 5 characters of the filename.
In this way, you can apply the renaming criteria to only a part of the file name, like capitalize only the first 5 characters or replace only the first 5 characters, etc.
Negative positions are also supported, where the position is evaluated from the end of the name, e.g., from -5 to -2.

You can change the order of the name segmentation in the renaming criteria using Special (14) Order

You can also use text and position in the Name Segment.
For example, you can set Name Segment -> From to '-': this will look for a '-' character in the file name and apply the name segment from there.
If you specify Name Segment->From: - and Name Segment->To: -, this will segment the file name from the first '-' to the second '-'.
You can also specify a position for the text, for example Name Segment->From: -,2 (comma separated) means from the second - in the file name.
Using Name Segment->From: ( and Name Segment->To: ) will segment the file name from the first open parenthesis to the first closed.
Using Name Segment->From: _ and Name Segment->To: _,3 will segment the file name from the first underscore to the third.
Using just Name Segment->To: _,2 will segment the file name from the beginning of the file name to the second underscore.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm


Return to How-To


cron