Folder renaming

How can I rename a folder with Ruby?

Klaus Fuchs wrote:

How can I rename a folder with Ruby?

File.rename(old_name, new_name)

Works on directories too.

Tom

On Tuesday 20 June 2006 22:19, Klaus Fuchs wrote:

How can I rename a folder with Ruby?

require ‘fileutils’
FileUtils.move “source”, “target”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs