Hi,

Of course you don't have to write down every file separately. Then the 
whole program wouldn't make sense, because you might as well copy the 
files "by hand".

I think the easiest way is to pass an array of the files to 
FileUtils.copy. To get an array of all files inside a folder, use 
"Dir[...]":

http://ruby-doc.org/core-1.9.3/Dir.html#method-c-5B-5D

You have to pass a certain path pattern, which is explained here:

http://ruby-doc.org/core-1.9.3/Dir.html#method-c-glob


require 'fileutils'

original_path, target_path =
  'C:/environ', 'C:/new'
FileUtils.copy Dir["#{original_path}/**/*.*"], target_path

-- 
Posted via http://www.ruby-forum.com/.