Search for strings in subfolders of certain parent folders

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Search for strings in subfolders of certain parent folders

Postby jwc » Mon Jan 23, 2017 10:24 am

I'm trying to search for a string in subfolders of ONLY certain parent folders. Specifically, I'm searching for the string "FB" in the name of subfolders of parent folders whose names begin with "PP". Once I find these subfolders whose names contain the string "FB", I like to make some changes their names. I'm going crazy trying to figure out how. Thanks for your help. Joe
Last edited by jwc on Mon Jan 23, 2017 11:46 pm, edited 1 time in total.
jwc
 
Posts: 9
Joined: Thu Jan 19, 2017 9:36 am

Re: Search for strings in subfolders of limited parent folders

Postby Emerkamp » Mon Jan 23, 2017 11:23 am

Hi

Selections (12) Folders + Subfolders
If you need to find a common pattern in filenames, then regex (1) is your best bet. If the same pattern is only in a few filenames, it also acts as a filter you can use.
The help file shows some common basic examples if how to use regex syntax.
Emerkamp
 
Posts: 140
Joined: Sat Aug 23, 2014 2:35 pm

Re: Search for strings in subfolders of certain parent folders

Postby jwc » Mon Jan 23, 2017 11:50 pm

Thank you Emerkamp, but I dont think you fully read my problem which is to limit the search to certain parent folders (those beginning with "PP"). If you know how to do this, I would be grateful for a regex example using the strings I'm trying to find. Thanks.
jwc
 
Posts: 9
Joined: Thu Jan 19, 2017 9:36 am

Re: Search for strings in subfolders of certain parent folders

Postby JMM » Tue Jan 24, 2017 6:10 am

You can't filter in BRU by the folder name, just by the file name.

However, in your case, I'd add the folder names to the filenames in a way I could remove it later easily, then filter by whatever RegEx you need with those, and rename the appropiate files. Once all is finished, remove the folder names you added to the filenames.

I'd put first a character it's not used in the filenames (so you can use the remove before feature). Then I would add the folder names using a separator (for the RegEx), and add it all as a prefix.

Hope that puts you in the right track.
JMM
 
Posts: 29
Joined: Sat Jan 25, 2014 12:12 pm

Re: Search for strings in subfolders of certain parent folders

Postby Emerkamp » Tue Jan 24, 2017 7:28 am

Hello:

Ok, try this
With Folders and subfolders ticked [only], under selections

Regex:
Match:
PP(.*)
Replace:
BB
This will filter only files begining with "PP" to BB in the new name collum. they will be green and you can then use:

You may or may not need this depending on how you file tree looks.
Then under option>> sorting = Group affected files. Hit the name collum sort arrow one more time.
From here try to pick the names you want change with the help from the sub-directories collom.

Then use replace or whatever you need, after you have your files selected

Edit: just seen you want to change folders inside of the PP parent folders also.
This may be hard to do since once finding the parents, after I don't think you can change the inside folders.
Unless you could somehow prepend the parent folder name to the subfolder, then find only the subfolders by searching for your prepended name.

I would try like stated above, and add something to the front of the parent folder names you can use to find the folders you need, then remove it it afterwards.
Like common patterens. _-_ or ---- ect, ect. But messing with folders inside parent folder, you either:
A. Need to have the parent selected as root
B. Need to know the name of the sub folder to change it.
Their is also A path length filter that can maybe help here.
Last is the java option, buy a license and see if the dev can come up with a java code for you

It would be nice if bru allowed this through the regex option, like Rename Master does. by using a sub for \ or folder.
Emerkamp
 
Posts: 140
Joined: Sat Aug 23, 2014 2:35 pm


Return to BRU Support