Automatically convert a file whenever it is saved? Is it possible to automatically convert a file to another format every time it is saved?

Some context:  I have a Numbers file which needs to be converted to csv for processing by various shell scripts.  At the moment I have to manually "Export to CSV" each time I edit the file, which I don't always remember.

The ideal solution would be to automatically trigger the "Export.." action every time the file is saved.  Is there any way to do this?  I would prefer a folder action, because I have a few different Numbers files with same problem.

Just to be clear:  the problem is how to trigger the conversion.

I'm using Numbers 3.2.2 on Mac OS X 10.9.5
Yes, OS X has built in automation with Applescript and folder actions.


http://www.macworld.com/article/1167157/automate_tasks_with_folder_actions.html
http://apple.blogoverflow.com/2012/06/folder-actions-tutorial-automation-meet-the-filesystem/
https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_folder_actions.html
https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html
http://macosxautomation.com


So, following the first link from MacWorld you can make a folder on your desktop that pops up an alert when you save your file. From there, you would make a different folder with a different script to attempt to convert the file. Lastly, make a script to clean up the file that's converted and move the processed file to the proper place.

I would instead make a service to just convert the file in place, but you can't trigger a service as easily as you can trigger a folder based workflow where actions initiate the processing.