Help needed filtering for folders containing ONLY photos or videos

I’m trying to use the ‘Folder Content’ filter clause to find folders containing ONLY Images (content type) Movies (content type).
OR
Find folders containing NO Images or Movies.

I’m hoping someone can assist me. I think the problem may be the deep folder structure.

Let's have a try:

type match folders
and match ( 
	match ( 
		foldercontent nomatch ( 
			type nomatch group Images
			and type nomatch group Movies
		)
	)
	or match ( 
		foldercontent nomatch ( 
			type match group Images
			or type match group Movies
		)
	)
)

57917.ofi

My test folder:

57917.zip


What makes you think that this is a problem? For what?

Thank you, but the results I get are not useful on your test folders or my test folders.

I think I was unclear in my request. I am hoping to get a filter to find folders containing ONLY Images and/or Movies

Alternatively: I need a filter for finding folders containing NO Images or Movies.

Ideally, both filters, but I figured that once I had one working filter, I’d be able to figure out the other.

According to the manual, the ‘Folder content’ clause is a '“special kind of sub-clause'“, but I could not get it to work as a sub-clause.

I thought a deep folder structure would be problematic when folders contain folders, or folders contain files and other folders.

Seems like you only need one of the foldercontent clauses per filter.

Yes. And you still are:

Ambiguous. Brush up on Boolean logic, if you find some time.

I can’t see how this is ambiguous, but I’ll just keep trying.

Hopefully @Leo or @jon can explain how ‘Folder Content’ is a “special Kind of subclause” as the manual states:

Does that mean it can act like a subclause?

What does this information in the manual mean:

Folder content

This is a special type of sub-clause that lets you match a folder based on its contents. For a folder to match, at least one item within it must match the criteria given in the sub-clause.

Does that mean the ‘folder content’ clause acts like a subclause? Or do I still need to use a subclause?

You use Folder Content like this:

That will match folders which contain at least one *.jpg item directly below them.

1 Like

FWIW, you can get instant results for cases like this using Everything 1.5 and Opus.
Paste this into the indexed search field with the "target" path listed above in Find In:

child:image:video: child-occurrence-count:child-file-count:

This is assuming you didn't mess with image: and video: extensions.
This will give you all the folders that ONLY (truly ONLY) have images and videos on it.

Check Search subfolders for make it recursive.

1 Like