Call script on upload

Hi,

I'd like to be able to execute a local script and parse a filename (hosted on filesystem) when a new file is uploaded to a particular directory via webdav.

How can this be achieved?

Thanks,
JB