Stopping Automator "Run Applescript" if file not found.
I'm creating a folder action that, when a file is added to the folder, will search the folder to see if the file is of a certain type (by the extension) and then run an Applescript that will open the file in the appropriate program. The problem is that not all files that go into the folder are of the correct type. Is there any way to tell Automator or Applescript to stop if no file is found (essentially "input" should be empty)?
Thanks,
Stuart
Mac OS X (10.4.6)