getting specific files in folder

I basically have some files in a folder, and I want to be able to do some stuff with only certain ones based on their comments. I know I can iterate through all the files, finding the ones I want, but I think I remember seeing a way to get particular files based on a property. For example, I remember seeing somewhere, someone getting all the files with a certain extension. Can anyone help here? Thanks.

The script below is set up as a drag 'n drop to process only Quark files in a given set of folders or files that is dropped. You can alter it to include different file types in the initial property list so it iterates through files and folders and only performs the main handler’s action on the file types in the property list.


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

ok, I found out the syntax for what I wanted. I just need to use the keyword whose


get files of myFolder whose comment = myString