I don't think that you can do this with a single "find" command (
find . ! -iname "folder.jpg" will find all files (and folders) not called folder.jpg).
To find all directories that do not contain this file, you could use a simple loop like:
Code:
for dir in `find . -type d`; do
if ! ls $dir/folder.jpg > /dev/null 2>&1; then
echo $dir
fi
done
The find command here just finds any directory, and the if statement then tests that ls cannot list a file called folder.jpg in that directory. (the "
> /dev/null 2>&1" after the ls statement discards all normal output, as well as any "No such file..." errors).