How to find files not containing comment x?
The expression has to be a single argument. Subexpressions can be joined with &amp;&amp;:

mdfind 'kMDItemFinderComment!=abc&amp;&amp;kMDItemFSName=*.xyz' -onlyin /path/to/folder/x