property last_search : "*.txt" tell application "Finder" try set finder_window to window 1 on error error "There are no Finder windows" end try set start_path to POSIX path of (target of window 1 as alias) end tell display dialog "Glob expression" default answer last_search try set glob to text returned of result set posix_matches to do shell script "ls -d " & quoted form of start_path & glob on error eText beep end try set matches to {} repeat with match in paragraphs of posix_matches set matches to matches & (POSIX file match) end repeat tell finder_window activate select matches end tell set last_search to glob