From: "Jesús Gabriel y Galán" Date: 2011-03-15T06:07:46+09:00 Subject: Re: Splitting up and Reassembling A File On Mon, Mar 14, 2011 at 8:11 PM, Rob Pa wrote: > Hi, > > I was wondering if you possibly help? > > I am looking to split up a file, say an image file, and then at a later > date reassemble all of the pieces of this split file to recreate the > image. > > I have implemented this so far; > > file = File.open("image.jpg","rb"){|f|f.read} > i = 1 > file.bytes.each_slice(10000) do |slice| >  new_file = File.new("file_#{i}.txt", "w+") Wild guess: have you tried creating these files with the binary flag too? Jesus.