set variable to filename

Hi,

I need to make a folder action script that will look at two types of files when the get added into the folder. One file will have “_thumbnail” in it’s name and the other one wont.

What i want to do is set a_variable to the name of all of the NEW files added into the folder that has “_thumbnail”. I’ll then be using this variable in a do shell script command.

It might be worth noting that this may need a repeat in as there maybe more than one file with “_thumbnail” in the name at any one time.

If it’s easier, the extension can also be changed to distinguish the difference between the items.

Any help appreciated.

Regards,

Dan