0

I've tried using the suggestions in this thread to no avail: How to use copyfile when there are spaces in the directory name?. To be clear, the directory I'm using is already in double-quotes, and I've tried escaping the spaces, but still get the same error. This is the error message I get:

    Error: Failed to open PDF file:
    C:/Documents
    Error: Failed to open PDF file:
    and
    Error: Failed to open PDF file:
    Settings/cpengelly/My
    Error: Failed to open PDF file:
    Documents/Dropbox/theproject/tmp/working/main
    Error: Failed to open PDF file:
    pdf.pdf
    Errors encountered.  No output created.
    Done.  Input errors, so no output created.

What is going on here?

Community
  • 1
  • 1

1 Answers1

0

you just need to put your directory name in double quotes. example -

FileUtils.cp("C:\\Program Files\\FileZilla\\dbghelp.dll","c:\\temp")
saihgala
  • 5,724
  • 3
  • 34
  • 31
  • I should have clarified that the directory name is already in double-quotes, sorry! – user1601292 Sep 10 '12 at 17:07
  • well in your example absolute file name is not double quoted. Instead of `pdf_path = "#{working_path}\/#{pdf_name}"` you should use `pdf_path = "\"#{working_path}/#{pdf_name}\""` – saihgala Sep 10 '12 at 17:26
  • Hmmm, tried that and now get this in addition to the previous error: http://pastebin.com/tKdjbX6X I'm thinking there must be an issue somewhere else in my code at this point. – user1601292 Sep 11 '12 at 16:42