Hello,
I have created an automator workflow as a finder plugin for the context menu of one or more selected image files. The workflow invokes the two actions "get selected finder item" and "run applescript". The applescript executes code as follows (exiftool is in $PATH):
<pre>
on run {input}
set input to input as text
set input to POSIX path of input
set the_file to input
display dialog "Image Name" default answer "" buttons {"OK", "Cancel"} default button 1
copy the result as list to {button_pressed, text_returned}
if {button_pressed is "OK"} then
do shell script "exiftool '-FileName<CreateDate' -d \"%Y-%m-%d " & text_returned & " %%f.%%e\" \"" & the_file & "\""
return input
end if
end run
</pre>
The workflow works properly when run from within automator, that is, selecting an item and press the "run" button in the automator window. *But* the plugin does not work. Why? And how can I fix it?
Thank you,
Sören
>> Stay informed about: Automator workflow w applescript rename selected image