From: Peter Bailey Date: 2013-05-09T20:52:32+09:00 Subject: Re: Problem with FileUtils move command. Peter Bailey wrote in post #1108388: > Matthew Kerwin wrote in post #1108321: >> On May 9, 2013 2:51 AM, "Daniel Stephens" >> wrote: >>> >>> Maybe it's not in [0]?? Drop that loop at the top of your script as well >> and lets see what we get. >>> >>> ARGV.each do |arg| >>> puts "Argument: #{arg}" >>> end >> >> Pro tip: When debugging vars that may be nil, use #p instead of #puts. >> You >> get much more useful output, e.g.: >> >> p ARGV[0] #=> nil >> p ARGV #=> [] >> >> Sent from my phone, so excuse the typos. > > I get this: > > F:\workflows\graphics\Asura-Non\RCSCR\in>e:\live\scripts\ruby\asura-non\rcscr\rcscr_pdf_single.rb > hlst205ar-15.pdf > nil > [] > ARGV == > C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:1631:in `path': no implicit > conversion of nil into String (TypeError) > from C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:1631:in > `fu_each_src_dest0' > from C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:1618:in > `fu_each_src_dest' > from C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:580:in `mv' > from > e:/live/scripts/ruby/asura-non/rcscr/RCSCR_PDF_single.rb:33:in `
' OK, gentlemen. I figured it out. I'm just an idiot. If you look at the top of this Ruby script, you'll see that I do a parse of the PDF file to see if it's a "healthy" PDF file. We use a program called Image Alchemy to do that. And, . . ., these are bad PDF files!!! And, because of that, as they're told, they're moved to a sister "badfiles" directory. So, they're not there to MOVE! I'm sorry for all your time. You guys have been great. Cheers, Peter -- Posted via http://www.ruby-forum.com/.