From: Simon ARNAUD Date: 2002-02-28T10:58:00+09:00 Subject: Re: [Q] Directory copy recursively On Thu, 28 Feb 2002 01:16:51 +0100, roktas wrote: > * kwatch [020228 01:38]: >> "roktas" wrote in message >> news:<20020225143216.A1028@WIN2K>... >> > * kwatch [020225 14:20]: >> > > If you know how to copy a directory recursively with ruby, >> > > please teach me. >> > > I can't find method like 'copy' or 'xcopy' in Dir class. You should try module FileUtils. I'm not sure it is in the base install or not. Directly from fileutils.rb : --- FileUtils#cp_r( list, dir, *options ) Options = preserve noop verbose copies file/directory FILE1 to DIR/FILE1, FILE2 to DIR/FILE2 ... If FILE is a directory, copies its all contents recursively. FileUtils.cp_r 'mail.rb', 'field.rb', 'debug/', site_ruby + '/tmail' FileUtils.cp_r :noop, :verbose, Dir.glob('*.rb'), '/home/aamine/lib/ruby' There are a lot of other methods that may suits you better. Simon ARNAUD aka Maz