I'm trying to create a rule based on the Text Content of a file. My rule is "If Text content contains fred" then move to trash. However the rule is not processing the file.
Further research I found out that although if I use the spotlight ui and search for "fred" the document is found. However when I run this from the command line "mdls -name kMDItemTextContent "test.rtf" it returns "kMDItemTextContent = (null)".
Am I using the wrong attribute to have it search through the file contents or is there something else wrong?
Thanks in advance, Scott.