Martin DeMello wrote in post #1058543:
> 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

Martin, thanks for getting back to me.

So I ran your code and it put out the line but then had an error
pdfappend.rb:18:in ``': No such file or directory - pdftk 01_cool.pdf 
02_cool.pdf cat output combined.pdf (Errno::ENOENT) from 
pdfappend.rb:18:in '<main>'

I also tried putting quotations around the #{cmd} and that run with no 
errors but did not output my new file

-- 
Posted via http://www.ruby-forum.com/.