From: John Wu Date: 2010-05-27T11:57:55+09:00 Subject: file copy Hi I am having a weird problem. I have the following code. require "fileutils" FileUtils.cp '/path/to/file.txt', '/path/to/archive/file-date.txt' File.open('/path/to/file.txt', 'w') What I want to do is copy file.txt content to file-date.txt in a sub directory, then reset file.txt to empty. But after I run the code above, both file.txt and file-date.txt are reset to empty file. What am I missing here? Thanks a lot! -- Posted via http://www.ruby-forum.com/.