From: hemant Date: 2006-12-14T23:19:40+09:00 Subject: Re: Swap contents in two files On 12/14/06, Christopher Latif wrote: > Robert Klemme wrote: > > 2006/12/14, Christopher Latif : > >> I have two files, I want to swap the contents of the files in my > >> program, suggestions? > > > > Renaming with a third temp file name is the most efficient if you know > > that no file handles are open on these files. > > > > robert > > How the code for that program going to look like? > How abt: require 'fileutils' FileUtils.copy_file("a.exe","b.exe") FileUtils.mv "a.exe.stackdump","a.exe" FileUtils.mv "b.exe","a.exe.stackdump" -- gnufied ----------- There was only one Road; that it was like a great river: its springs were at every doorstep, and every path was its tributary.