From: Peter Hickman Date: 2012-10-29T03:10:59+09:00 Subject: Re: Passing folder as argument ARGV? What os are you using? Here is one way to get things to work on OSX or Linux. First the script --- fred.rb --- #!/usr/bin/env ruby p ARGV [~]$ ./fred.rb Projects/ ["Projects/"] [~]$ ./fred.rb Projects/* ["Projects/fredkin.bas", "Projects/parsepng.pl", "Projects/visible_xml.xslt"] It all comes down to how you call it. This does assume that the files you want are all in the directory you specify and not in directories inside the directory given in the argument. Also OSX and Linux will complain if there are too many files.