Include & Exclude filtering Simultaneously?

Bulk Rename Utility How-To's

Include & Exclude filtering Simultaneously?

Postby RajK2005 » Thu Jun 30, 2022 8:22 am

Hello

Is there a way I can use Filters (12) to include only files that contain certain text but also exclude certain other text?

For example:

A1.jpg
A2.jpg
AB.jpg
AC.jpg
BC.jpg
CD.Jpg

I want to include all files that contain A but doesn't contain B.

*A* would show: A1, A2, AB, AC

* !*B* would show A1, A2, AC, CD.

I want to combine these two so the result is: A1, A2 & AC.

I don't have and can't afford commercial license so the option of name.indexOf('A') !== -1 or any other Javascript renaming wouldn't work for me.

Any help is greatly appreciated. Thank you..
RajK2005
 
Posts: 2
Joined: Thu Jun 30, 2022 8:10 am

Filters(12) Multiple Masks are space separated

Postby Luuk » Thu Jun 30, 2022 9:43 am

The Filters(12) "Mask" use a space to separate multiple file-specs, so like... *A* !*B*
To put spaces inside a file-spec, it needs a checkmark for RegEx, so then more like... ^(?!.*B.*).*A.*
Luuk
 
Posts: 481
Joined: Fri Feb 21, 2020 10:58 pm

Re: Include & Exclude filtering Simultaneously?

Postby Admin » Tue Jul 19, 2022 9:37 am

Hi, the latest version now supports quotes (") for filters (12) also for non-regex to handle filters with spaces.
https://www.bulkrenameutility.co.uk/Download.php
Admin
Site Admin
 
Posts: 2148
Joined: Tue Mar 08, 2005 8:39 pm

Re: Filters(12) Multiple Masks are space separated

Postby RajK2005 » Fri Jul 22, 2022 10:47 am

Luuk wrote:The Filters(12) "Mask" use a space to separate multiple file-specs, so like... *A* !*B*
To put spaces inside a file-spec, it needs a checkmark for RegEx, so then more like... ^(?!.*B.*).*A.*



Thank you very much. It worked. I was falsely assuming you need * !*B* to exclude B when you only need !*B*
RajK2005
 
Posts: 2
Joined: Thu Jun 30, 2022 8:10 am


Return to How-To


cron