I have a windows application will create a .xml file and upload it to a folder on my Linux server. I need a way to watch for this new file, its filename would be something like "004job.xml", "012job.xml" etc,etc. The filename is different every time. After the file is detected, a script would be run with the new file as its command line variable. Like this "/home/project/scripts/renderjob.sh /home/project/jobs/012job.xml". The script will do some actions based on the contents of the .xml file and the last action is to delete the .xml file.
Its also important that only one instance of this script is running at a time. but that is a horse of a different color.
Thanks for reading.