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.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Bob Showalter
2007-Oct-12 21:36 UTC
Re: How to move a file from one folder to another folder
On 10/12/07, Vidya Vidya <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi all, > > I want to move the file from one folder to another folderUse File.rename() or FileUtils.mv() The first one won''t move to a different disk. The second one will. HTH --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---