How to move a file from one folder to another folder

Hi all,

I want to move the file from one folder to another folder, but i
don;t which command to use it, please let me know, if anybody knows
my present coding is,

Dir["#{dirname}//"].each do | thisfile |
thisfile.gsub! ( /// , ‘\’ )
results.push ( thisfile )
f = File.open(thisfile,“r”)
@aread=f.read()

// after reading here i want to move the present file to another
directory.

end

please help me to do this.

On 10/12/07, Vidya V. [email protected] wrote:

Hi all,

I want to move the file from one folder to another folder

Use File.rename() or FileUtils.mv()

The first one won’t move to a different disk. The second one will.

HTH