[H-GEN] Automatic execution of a script/program upon receipt of a file?

Anthony Irwin anthony at server101.com
Wed Jul 12 23:59:02 EDT 2006


Scott Wilson wrote:

> I was wondering if anyone knew of a tool that, when a file landed in a 
> directory (specifically, a writeable SMB share) a script could be 
> executed using the filename as a parameter of the script. The reason 
> why I ask is, I'd quite like to do batch conversion of video files 
> into a different format on a headless box - Click-and-drag a video 
> into the share, and a few hours later, a transcoded/converted version 
> of the file pops out the other end. So:
>  
> 1) is it possible?
>  
> 2) any easy way to implement it?
>  

Hi,

I am not aware of any tools but you could set a cron job to run every 
minute that runs a script that checks the share location for the video 
file type you want to convert then move the file to another location and 
run the conversion.

As your needs change you could modify your script to check different 
file types and run different types of conversions. You could even write 
the script to copy the converted file to another share when the 
conversion is complete so you just check the second share every so often 
to see if it has finished.

Kind Regards,
Anthony Irwin




More information about the General mailing list