How can I rename a folder with Ruby?
···
--
Posted via http://www.ruby-forum.com/.
How can I rename a folder with Ruby?
--
Posted via http://www.ruby-forum.com/.
Klaus Fuchs wrote:
How can I rename a folder with Ruby?
File.rename(old_name, new_name)
Works on directories too.
Tom
--
Tom Werner
Helmets to Hardhats
Software Developer
tom@helmetstohardhats.org
www.helmetstohardhats.org
require 'fileutils'
FileUtils.move "source", "target"
On Tuesday 20 June 2006 22:19, Klaus Fuchs wrote:
How can I rename a folder with Ruby?
--
Stefan