Fsniper is a tool that watches for new or modified files and executes commands on the basis of the file name critieria. The tools can also respond to MIME types (MP3, mpeg etc).
After downloading the source from the project homepage
# ./configure
# ./make
# ./make install
Create the configuration file at your home folder in .config folder
# ~/.config/fsniper/config file
Copy the example.conf from source folder and modify it.
For more information, see Fsniper Project Homepage