Variable avalible for the batch of files or argument?

Hi,
I want to process the whole batch of files moved into the folder Hazel is watching when using a shell script or Applescript.
At present I can only process each file one at a a time using the variables 'theFile' (Applescript ) or '$1' (shell)
But I when using a embedded Shell or Applescript I want to pass a list of all the files added at that time.
I know there should be arguments for all the files or input. But I cannot find them.
Can someone please tell me what they are
Many thanks
I want to process the whole batch of files moved into the folder Hazel is watching when using a shell script or Applescript.
At present I can only process each file one at a a time using the variables 'theFile' (Applescript ) or '$1' (shell)
But I when using a embedded Shell or Applescript I want to pass a list of all the files added at that time.
I know there should be arguments for all the files or input. But I cannot find them.
Can someone please tell me what they are
Many thanks