Find specific files that have certain (words in parenthesis)

Bulk Rename Utility How-To's

Find specific files that have certain (words in parenthesis)

Postby KINGLIFER » Tue Aug 29, 2023 5:46 pm

Hello fellow users. I got one more that is jogging by brain.
I am trying to make a formula that find examples like this:
(Official HD Video) or (Official music Video) or (Music Video) or even (music lyric video)

This regex pattern should match song titles like "Drake - Love You (Official HD Video).mkv" or "Prince - I Would Die for U (Official Video).mp4" while excluding titles like "LL Cool J - I'm That Type of Guy (Remix)".

basically anything that has music, official or HD with video in it. IF that matches catch em all.

I tried this and yup. does not work lol.
^(?!.* - )(?!.*\(.*official.*\))(?!.*\(.*music video.*\)).*\(.*\)-.*\.\w+$

Any help would be a God send.

Thank you!
KINGLIFER
 
Posts: 10
Joined: Thu Aug 24, 2023 4:21 pm

Re: Find specific files that have certain (words in parenthesis)

Postby KINGLIFER » Tue Aug 29, 2023 7:42 pm

Title has a typo. I wanted words in Parenthesis. I apologize I could not find how to change the title.
KINGLIFER
 
Posts: 10
Joined: Thu Aug 24, 2023 4:21 pm

Re: Find specific files that have certain (words in bracets).

Postby KINGLIFER » Tue Aug 29, 2023 8:49 pm

I did find a fix in replace (3)
-video| (official HD video)| (Official Video)| (official music video)
but if a variation I was not aware of is present in the thousands of folders I will not know if it fixed it.
example (Official LYRIC VIDEO).
KINGLIFER
 
Posts: 10
Joined: Thu Aug 24, 2023 4:21 pm

Find names ending like (words video)

Postby Luuk » Tue Aug 29, 2023 10:26 pm

To find names ending like your examples, can use the "Mask" inside of Filters(12) with a checkmark for "Regex".
So then, just click the blue-arrows beside "Mask" to conduct your searches, this some different "Masks"...

If knowing all possible words before video, can use a "Mask" like...
(?i).+ - .+\(((Official|Music|HD|Lyric) )+video\)\.[^.]+$

If knowing the beginning-words, with maybe more words, before video...
(?i).+ - .+\(((Official|Music|HD)[^?]* )+video\)\.[^.]+$

If knowing words that can come anywhere before video...
(?i).+ - .+\(([^?]*(Official|Music|HD)[^?]* )+video\)\.[^.]+$

If knowing there is at least 1-word, before video...
(?i).+ - .+\(([^?]+ )+video\)\.[^.]+$
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Find names ending like (words video)

Postby KINGLIFER » Wed Aug 30, 2023 11:59 am

Luuk wrote:To find names ending like your examples, can use the "Mask" inside of Filters(12) with a checkmark for "Regex".
So then, just click the blue-arrows beside "Mask" to conduct your searches, this some different "Masks"...

If knowing all possible words before video, can use a "Mask" like...
(?i).+ - .+\(((Official|Music|HD|Lyric) )+video\)\.[^.]+$

If knowing the beginning-words, with maybe more words, before video...
(?i).+ - .+\(((Official|Music|HD)[^?]* )+video\)\.[^.]+$

If knowing words that can come anywhere before video...
(?i).+ - .+\(([^?]*(Official|Music|HD)[^?]* )+video\)\.[^.]+$

If knowing there is at least 1-word, before video...
(?i).+ - .+\(([^?]+ )+video\)\.[^.]+$



I never smiled so hard in my life over a post. LOL.
THANK YOU SO MUCH!
KINGLIFER
 
Posts: 10
Joined: Thu Aug 24, 2023 4:21 pm

Find names ending like (words video)

Postby Luuk » Wed Aug 30, 2023 8:06 pm

Except theres a typo in most of them, although still conducting properly 90% of the time.
I think it was just a bad copy/paste, but really they should have been posted like...


If knowing all possible words before video, can use a "Mask" like...
(?i).+ - .+\(((Official|Music|HD|Lyric) )+video\)\.[^.]+$

If only knowing the beginning-words, with maybe some more words, before video...
(?i).+ - .+\(((Official|Music|HD)[^)]* )+video\)\.[^.]+$

If only knowing words that can come anywhere before video...
(?i).+ - .+\(([^)]*(Official|Music|HD)[^)]* )+video\)\.[^.]+$

If only knowing there is at least 1-word, before video...
(?i).+ - .+\(([^)]+ )+video\)\.[^.]+$
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To