I was asked to look and see if I could come up with a trick to "easily" find all directories in my friends video collection, that did not have a trailer file.
For reference:
Trailers are called "trailer.mp4" in this example, and the root path of all video directories is "/Volumes/SomeShare/Multimedia/Movies" - replace these with the proper info for your setup.
find /Volumes/SomeShare/Multimedia/Movies -maxdepth 1 -mindepth 1 -type d '!' -exec sh -c 'ls -1 "{}"|egrep -iq "trailer.mp4" ' ';' -print
This one liner will dig through all directories in "/Volumes/SomeShare/Multimedia/Movies".
It will however only go exactly one level deep (-maxdepth 1 -mindepth 1), meaning it will look into "/Volumes/SomeShare/Multimedia/Movies/A Movie/" but not in "/Volumes/SomeShare/Multimedia/Movies/A Movie/Pictures/".
Picking up those that do not have trailer.mp4 in it.
Just posting this here so my friend can copy it straight from here, and maybe its helpful for other that are looking for directories that do not contain a certain file. Eg. missing cover images in your music collection. If that requires 2 files, then you could do something like this:
find /Volumes/AllShares/Multimedia/Music -mindepth 1 -maxdepth 1 -type d '!' -exec sh -c 'ls -1 "{}"|egrep -i -q "cover\.(jpg|png)"' ';' -print