How can I search for specific items in a folder?

You can ask the Finder for specific items within a folder. You can specify several “filters” to match the files, such as its modification date, name or label. You can ask for any item, only for files, folders or even “internet location files” (those with extension “.webloc”). Finally, you can also tell the Finder to search for items in nesteed folders using the “entire contents” property. Some examples:

Find any item containing “as” in its name:

set theFolder to alias "path:to:dir:"

tell application "Finder"
	items of theFolder whose name contains "as"
end tell

Find any file older than a year:

files of theFolder whose creation date > ((current date) - (365 * days))

Find “internet location files” is any place of theFolder’s hierarchy:

internet location files of entire contents of theFolder

Find files with extension “.txt” and label 3 (whatever is this color in your system):

files of theFolder whose name extension is "txt" and label index is 3

Take a look to the Finder’s dictionary for more properties (which you can use to ask for items).

If you are a experienced shell scripter, you can utilize as well a “do shell script” call and use some *nix tools, such as ls or find, in combination with grep, sed or awk.