On Thu, Apr 26, 2012 at 1:07 PM, Christopher D. <lists / ruby-forum.com> wrote:
> into one final directory. As a test this is the code I came up with.
>
> pdfs = Dir["*.pdf"].sort.join(" ")
> `pdftk #{pdfs} cat output combined.pdf`
>
> Which results in an error: "No file or directory -pdftk ["01_cool.pdf",
> "02_cool.pdf"] cat output combined.pdf

Inspect the string before running it:

pdfs = Dir["*.pdf"].sort.join(" ")
cmd = "pdftk #{pdfs} cat output combined.pdf"
puts cmd
`#{cmd}`

martin