Folder action script not working
Folder action script not working
- Subject: Folder action script not working
- From: Rob Lewis <email@hidden>
- Date: Fri, 1 Aug 2008 00:35:56 -0700
I'm working with an app that on each run writes 2 JPEG files and a
text file to a folder. Then it calls Exif Tool to add metadata to the
JPEGs it just wrote.
I want to post-process these files using a folder action script
attached to this output folder. Currently, all the script does is
test some of the metadata (with a "do shell script" call to Exif
Tool), and move the JPEGs to another folder and then rename them.
It works perfectly if I use the script's run handler and the choose
file dialog to pass it a file to work on. But when run as a folder
action, it misses at least one, and usually both of the JPEGs.
I figured it must be a race condition:
--App writes JPEGs in output folder
--Folder action triggers and tries to read metadata
--App is still trying to write metadata with calls to Exif Tool
--Folder action fails
Sounds plausible, right? But even putting in a "delay 20" at the
start of the script (giving Exif Tool plenty of time to finish
writing the metadata before I try to read it) doesn't work.
Any thoughts?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden