From: "Jan E." Date: 2012-07-04T17:58:50+09:00 Subject: Re: Copying Files Alex C. wrote in post #1067346: > Ryan Davis wrote in post #1067277: >> You want to `ri Enumerable.reject` > > How do I use that? I can't find any examples You use it to reject all elements from an Enumerable for which the block is true (to be more exact: not nil or false). As an example: numbers = 1..10 # get even numbers by rejecting all odd numbers even = numbers.reject {|num| num.odd?} p even In your case you want to reject all files in a certain folder, so you might check if the current file path begins with the folder path: ignore_folder = 'C:/folder/ignore' copy_files = Dir["#{original_path}/**/*.*"].reject do |file_path| file_path.start_with? ignore_folder end However, this is not a perfect solution, because it will do an exact string comparison rather than actuall compare the folders. But it should work for a small script. -- Posted via http://www.ruby-forum.com/.