Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Automator : JPG to PDF (with auto-rename regarding folder name)

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 :

2011_my_house/IMG_1001.jpg

2011_my_house/IMG_1002.jpg


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


After :

2011_my_house/IMG_1001.jpg

2011_my_house/IMG_1002.jpg

2011_my_house.pdf



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-OTHER, Mac OS X (10.5.8)

Posted on Jun 20, 2011 5:11 AM

Reply
7 replies

Jun 20, 2011 6:45 PM in response to MarcPJ31

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.

Automator : JPG to PDF (with auto-rename regarding folder name)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.