I have an automator workflow, that is supposed to take a PDF from Hazel, split it into it's single pages and store the new PDFs one level above the input file. The output folder of the single page PDFs should depend on the input file.

Link to workflow in Dropbox

The first action is only for debugging purposes and doesn't contain a file in the saved version.

The last action claims to finish successfully, but it doesn't write anything. Or least I can't find any PDFs where I'd expect them.

When I set the target of the split PDF action to a preselected, fixed folder it works. But then the output location won't be determined by the input file.

How to get it to do what I want?


Just found this similar issue (thanks to the issue suggestion bar on the right). I'll try that Apple script over there later, maybe the presentation of my folder isn't as the action would like it

Automator: extract PDF text and save in current directory

  • Maybe it's just me, but I seem to be missing something because it's not entirely clear to me what isn't actually working? What I mean is that you describe in the first sentence what it's supposed to do, and later on you say that when you set the target folder to a fixed folder, it works. So, how exactly are you wanting to use this and in what way isn't it working? – Monomeeth Apr 20 '18 at 9:57
  • I edited the question to hopefully clarify this – Sandro Apr 20 '18 at 10:09

An adaptation of the code from the above mentioned thread

on run {input, parameters}
    tell application "System Events"
        set thePath to POSIX path of (container of container of (item 1 of input))
    end tell
    return thePath
end run

worked like a charm.

So I guess, the problem as in the presentation of the folder. While the "Set Variable" action can deal with a finder folder object and preview it correctly, the split PDF action apparently can't.

You must log in to answer this question.

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