From: 7stud -- Date: 2009-04-27T13:59:14+09:00 Subject: Re: Creating directory and its files Martin Sharon wrote: > You mention me it's safe to create a directory with date version > like directory_yy_mm_dd > > i can get date by > > time=Date.today() > > but how to connect the directory name with the time? > > I use > > FileUtils.mkdir_p ARGV[0]+time > require 'date' time = Date.today() fname = "somestring" combined1 = fname + time.to_s combined2 = "#{fname}-#{time}" puts combined1, combined2 --output:-- somestring2009-04-26 somestring-2009-04-26 -- Posted via http://www.ruby-forum.com/.