From: ts Date: 2003-05-25T00:23:45+09:00 Subject: Re: file copy blues >>>>> "k" == kingsley writes: k> At the moment I am copying the names of all the sub directories then k> creating them in the new location, then recursively going through each k> of the sub directories and copying the files to the new directories k> created. Well 1.8 has a module fileutils # # Options: preserve noop verbose # # Copies +src+ to +dest+. If +src+ is a directory, this method copies # all its contents recursively. If +dest+ is a directory, copies # +src+ to +dest/src+. # # +src+ can be a list of files. # # # Installing ruby library "mylib" under the site_ruby # FileUtils.rm_r site_ruby + '/mylib', :force # FileUtils.cp_r 'lib/', site_ruby + '/mylib' # # # Examples of copying several files to target directory. # FileUtils.cp_r %w(mail.rb field.rb debug/), site_ruby + '/tmail' # FileUtils.cp_r Dir.glob('*.rb'), '/home/aamine/lib/ruby', :noop, :verbose # def cp_r( src, dest, options = {} ) For 1.6 it can be found in ruby_shim http://raa.ruby-lang.org/list.rhtml?name=shim-ruby16_18 Guy Decoux