From: Peter Cooper Date: 2007-06-14T01:31:40+09:00 Subject: Re: File.new and non-existent directories On 6/13/07, Jason Roelofs wrote: > You are correct, File.new creates files, not directories. > > Check out Dir and FileUtils: http://ruby-doc.org/core/ > > FileUtils.mkdir "..." unless File.directory?('...') And also (in the spirit of TMTOWTDI): require 'ftools' File.makedirs("dir1/dir2/dir3") As covered before ( http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/50237 ) Cheers, Peter Cooper http://www.rubyinside.com/