From: 7stud -- Date: 2008-03-05T00:08:34+09:00 Subject: Re: ruby tk -- how do you get it working? Tim Ferrell wrote: > > def delete_to_stage(file) > destdir = File.join(TEMPROOT, File.dirname(file)) > FileUtils::mkdir_p(destdir) > FileUtils::mv(file, destdir) > end > Thanks. I was just playing around with mkdir_p(I was actually using the alias mkpath). I tested it out on my test directory structure(from above), moving the files from those directories into another directory--keeping their paths intact--and it worked nicely. One thing I discovered: join() doesn't work in this case. You are trying to join something like: /users/me/Test + /users/me/2testing/dir2/test2.txt and join just puts a '/' between them producing: /users/me/Test //users/me/2testing/dir2/test2.txt -- Posted via http://www.ruby-forum.com/.