thank you lukas! testing it
now...
one question... do I also need to echo the file names so the next
part in the script gets them? (this part is only 1/2 way through
the script)
On 10/21/15 4:11 AM, Lukas Rose wrote:
Hi Josh,
this task is quite easy to accomplish. You start by creating the
folder action just as you described, by adding the „Filter
Finder Items“, and anything else you need to filter your files.
At the point where the list of files is completed (e.g. after
the „Filter Finder Items“-action), you add a „Run Shell
Script“-action. Remove the „cat“-thing that’s in there by
default, and paste the following code into the white field:
for f in "$@"
do
jhead -autorot $f
done
What this does is quite simple. For each file that is passed to
the „Run Shell Script“-action (these are represented by $@), the
shell script should do the following: Run the command „jhead
-autorot“ for the current file, which is represented by $f. It
will do so for each file.
For this to work you need to tell Automator how to pass the
files to your script. This is done by the drop-down menu on the
top right of the „Run Shell Script“-action. Change the default
value „Pass input to stdin“ to „Pass input as arguments“. Then
you’re done, and your Workflow should work.
Feel free to ask again if you have any questions! Have fun
Kind Regards,
Lukas
On 21.10.2015,
at 11:02, Josh Reiss <email@hidden>
wrote:
Hi.. total newbie to Automator here.
I'm trying to call jhead from within a folder action
basically I want to
-move all files
-call jhead command to fix rotations on all files in a folder
jhead -autorot *.jpg
-and then continue on with the next action in the automator
script
so would someone be kind enough to explain to this newbie how
to put this command line call in the middle of my automator
script and to make sure that it runs before automator goes on
to the next thing?
Or even better... is there a way if I'm working on a few
images at once to have automator actually run the jhead
command on the filename?
like
jhead -autorot <filename passed in from automator>
my automator script starts with "Filter Finder Items" to get
all the items in the folder.
thanks!
-Josh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden