Text does not contain any of exclusion list

(names of folders of folder "C:\Users") whose (it as lowercase does not contain "pub")

The above works and gives me all folder names (profile folders) in “C:\Users” that doesn’t match “pub”. Is there an “easy” way to exclude from a list?

something like …

(names of folders of folder "C:\Users") whose (it as lowercase does not contain any of ("pub","default","all users")

and figured it out … yes, yes there IS a way …

(names of folders of folder "C:\Users") whose (it as lowercase is not contained by "public|default user|all users")

BUT … the “contained by” list has to be EXACT matches. This is good enough for my needs.

3 Likes

It gets tricky because contains requires singulars and you want to check contains on a plural list.

You can fix that with a tuple and iteration.
Check this one out

q: names of folders whose (not exists (name of it as lowercase, ("pub";"default";"all users")) whose (item 0 of it contains item 1 of it) ) of folder "C:\Users"