anti wrote: > On Dec 18 2007, 9:15 am, Florian Schaf <flo.sc... / gmail.com> wrote: > >> hi! >> Can anyone tell me how I can check whether a directory exists or not? I >> didnt find anything via google or in the docs >> thanks! >> -- >> Posted viahttp://www.ruby-forum.com/. >> > > if Dir["C:/ruby"] != nil > puts 'Yeehoooo !' > else > puts 'no such directory' > end > > > Yep. And the long version would be path="/some/path" if File.exists?(path) && File.directory?(path) puts "yeeha" else puts "bummer" end ;) V.- -- http://www.braveworld.net/riva