require 'fileutils'

path =3D "string to the folder"
FileUtils.mkdir_p(path)


-----
Carlos Agarie

Control engineering
Polytechnic School, University of S=E3o Paulo, Brazil
Computer engineering
Embry-Riddle Aeronautical University, USA


2013/1/10 Arup Rakshit <lists / ruby-forum.com>

> Carlo E. Prelz wrote in post #1091698:
> > Subject: Can I create directories with dynamic names on run time using
> > Ruby1.9?
> >   Date: Thu 10 Jan 13 04:46:05PM +0900
> >
> > Quoting Arup Rakshit (lists / ruby-forum.com):
> >
> >> My script is now running to download files for request number 87665. S=
o
> >> all the downloaded files are to be put in the destination folder Curre=
nt
> >> Download\Attachment87665. So how do I do that?
> >
> > Function FileUtils#mkdir_p makes sure that all intermediate
> > directories are created when creating a path.
> >
> > Carlo
>
> Can I have a simple `snippet` for that, I am totally new to Ruby. I have
> Ruby 1.9.3 installed in my PC(windows 7)
>
> --
> Posted via http://www.ruby-forum.com/.
>
>