From: Alex Fort Date: 2010-05-28T23:40:59+09:00 Subject: Re: Append a file to another file On Fri, May 28, 2010 at 10:34 AM, John Wu wrote: > Hi, > > What is the best way to append the content from one file to another > file? > > Thanks! > -- > Posted via http://www.ruby-forum.com/. > > Just open the file in append mode, and write the contents of the file you want to append to it. eg: to_append = File.read("foo.txt") File.open("bar.txt", "a") do |handle| handle.puts to_append end Alex