I'm using the Automator action "Convert to PDF" from ABBYY FineReader Pro. It just does OCR recognition on a given file and saves the output to a new PDF.

It looks like this:


The issue I'm having is the output folder ("Ausgabe speichern in"). I want to tell Automator, that the full path of the input file is also the desired path of the output file (nice to have: and appends "-ocr" to the filename).

I already found out, that this could be done with the AppleScript snippet, that you see on the bottom of the screenshot. Unfortunately, the files will end up in /Applications, because the ABBYY app is in there and so the variable isn't being interpreted as I wanted it to be.

Any insights and hints will be highly appreciated.

  • I don't think so. The path is a relative/dynamic/changing information, because the files are coming from different directories.
    – Marc
    Commented Feb 11, 2017 at 18:35
  • Was my answer at all helpful in figuring out your issue? Commented Feb 17, 2017 at 13:44
  • unfortunately I haven't had the time to test this yet. I'll get back to this as soon as possible. Thank you so much for getting into this!
    – Marc
    Commented Mar 2, 2017 at 11:13

1 Answer 1


Okay, I downloaded the ABBYY_FineReader_Pro_ESD.dmg file from abbyy.com and installed it, then opened it to look at the help file for use with Automator. It didn't have much information so I checked the link in the help file back at abbyy.com and while it had some additional info, it did't have what I was looking for. Namely, documentation on programmatically setting "Output filename:" to a variable, like can be done with "Save output to:" setting it to a variable.

The following is an example of an Automator workflow, saved as a Service, to take a selected Image file in Finder and convert it to and editable PDF document. You can see in the image below what settings are relevant. Note that the only option in the Variable Options for the current_path variable only has a Name: field, no Script field. And while the image is taken in OS X 10.8.5 nonetheless I tested it in macOS 10.12 and Automator doesn't show Variable Options as in your picture. (So how did you get it like that?)

enter image description here

I set "Save output to:" by drag and drop the current_path variable onto it and then saved the Service. It important that you don't run the Service from within Automator because if done from Automator it changes "Save output to:" the containing folder's path and doesn't reset like it does automatically when it run as a Service from Finder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .