From: Joel VanderWerf Date: 2004-05-09T04:54:30+09:00 Subject: Re: Move a folder Dirk Einecke wrote: > Hi. > > I want to move a folder from "/folder1/foo" to "/folder2/foo". I can not > find a function for moving a folder. Is it right that I've to copy the > src-folder (with FileUtils.cp_r) and then remove this one from the old src? FileUtils.mv works for me: [~] cd tmp [~/tmp] mkdir folder1 [~/tmp] mkdir folder2 [~/tmp] mkdir folder1/foo [~/tmp] irb -r fileutils irb(main):001:0> FileUtils.mv 'folder1/foo', 'folder2/foo' => 0 irb(main):003:0> Dir['**/*'] => ["a.rb", "b.rb", "folder1", "folder2", "folder2/foo"]