From: Joel Pearson Date: 2013-02-01T00:33:09+09:00 Subject: Re: How to copy the directory files only to another directory? Oops, I didn't read your request carefully enough the first time. Here's a copy version: require 'fileutils' Dir.chdir 'C:/' files = Dir.glob('**/*.*) files.each do |fname| FileUtils.copy File.absolute_path(fname), 'D:/document/' + File.basename(fname) end -- Posted via http://www.ruby-forum.com/.