7 Replies Latest reply: Apr 6, 2016 9:45 AM by larpus
MarcPJ31 Level 1 Level 1

Hello everyone,


I'm trying to develop an automator script that transform a folder with pictures (jpg, png...) to a unique PDF file.

The idea is simple : I right-click on a folder, then I choose my workflow script, then the system creates a PDF file.


I managed to perform the first part of the script : it generates a PDF file called "my_picture.pdf". I use an automator script.

But on the second part, I can not rename this file similar to the "right-clicked" folder name.




This is an example of what I want.


Before :




I right-click on the folder 2011_my_house and I choose my automator script.


After :






My questions :

1) Is it possible to do that with automator ?

2) If not possible, is it possible to call an automator script from the command line ? How does Automator handle the parameters ?



Thank you in advance,


-- Marc

Automator, Mac OS X (10.5.8)
  • red_menace Level 6 Level 6

    You are going to need a few third party actions, since there isn't a default one to get the name of a folder and the rename action doesn't take variables.


    I have some actions on my Automator homepage that might be useful - the Get Names of Finder Items action will get the name of your folder so that you can put it into a variable, and the Change Name of Finder Items action will accept variables for the name to change to.


    You also might want to deal with the possibility of multiple items being selected, some of which may not be folders.  You can use the Filter Finder Items action to filter out items that are not folders, but you will need to either trim the input list to just one item or use something like the Dispense Items Incrementally action to step through the input items one at a time.

  • TonyKambo Level 1 Level 1

    Thank you for that Get Names of Finder Items action. It was a life saver! Don't know why Apple didn't have one by default.

  • BDAqua Level 10 Level 10

    Tony, Red is great,  I always learn something from him!

  • ali_bat Level 1 Level 1

    Hi red_menace,

    I'd really love to use your Get Names of Finder Items action, but the link seems to be broken. Are you able to post it it here?


  • red_menace Level 6 Level 6

    My ISP went brain dead when I updated my service, so I am without a web host at this time - if you would like me to email you a copy, my address is in my profile.

  • pjdube Level 3 Level 3

    Hope you are still there, but this can be done in automator. I have it as an app, but you can make it into a service and this will do it for you:


    Screen Shot 2013-04-03 at 10.32.24 PM.JPG

    Screen Shot 2013-04-03 at 10.32.36 PM.JPG

  • larpus Level 1 Level 1

    and how can i convert multiple images to multiple pdfs? is there a way to do it? it just keeps merging, i dont want to merge :/