I want to watch a folder on my Mac (Snow Leopard) and then execute a script (giving it the filename of what was just moved into a folder (as a parameter… x.sh “filename”)).

I have a script all written up in bash (x.sh) that will move some files and other stuff on input $1 I just need OSX to give me the file name when new files/folders are moved/created into a dir.

Any such command?

16 Answers
16

Leave a Reply

Your email address will not be published. Required fields are marked *