I've got an Automator workflow that is supposed to backup the contents of my USB stick whenever I plug it in (after asking for a confirmation). It works if I trigger it manually within the Automator GUI. When I save it as a folder action, the workflow is triggered as expected (I get the confirmation prompt) but then gets stuck somewhere.

What options do I have to find out what is going wrong? In what does the environment of the workflow differ when it's called as a folder action?

annotated workflow

link|improve this question
Does it work when not run as folder action, but e.g. started as a Service? – Daniel Beck Nov 12 '11 at 21:19
@DanielBeck How would I do this? – vwegert Nov 13 '11 at 9:55
@slhck see linked file – vwegert Nov 13 '11 at 10:11
Use File » Duplicate To… in Automator, then select Service. It'll then show up in the Services sub-menu of the application menu (the menu whose label is the active application's name). Click to launch. – Daniel Beck Nov 13 '11 at 10:21
Consider uploading the workflow as a screenshot image to imgur via this site's upload functionality, and annotating it within your question. There's no lasting value in linking a file automatically deleted within a month. – Daniel Beck Nov 13 '11 at 10:26
show 6 more comments
feedback

1 Answer

up vote 1 down vote accepted

Your script is only checking whether the encrypted volume exists, not the USB stick.

Make sure the folder action isn't triggered because of something else by adding a check for the destination volume to the workflow.

In general, if something's not working when automatically triggered, it's best to replicate as much as possible in a manually started process. In that case, executing within Automator or making it a service or application instead proved to be useful for finding the issue.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.