From: Lloyd Linklater Date: 2007-09-26T13:04:17+09:00 Subject: Re: concatenate a set of files As a ruby nuby I am not yet good enough to golf this, but I went through the standard books to cobble this together mostly to say that it should be easy to figure this out. It took me just a few minutes for this so, if you get the books, it should work for you too. my_files = ["f:\\belfry\\1.txt", "f:\\belfry\\2.txt", "f:\\belfry\\3.txt"] f = File.new("c:\\joined.txt", "a+") my_files.each do |f_name| f_in = File.open(f_name, "r") f_in.each {|f_str| f.puts(f_str)} f_in.close end f.close disclaimer: I apologize for the look and feel of the 'compiled language' approach. I am still a n00b to the ruby way. :) -- Posted via http://www.ruby-forum.com/.