From: Hoodoo Wen Date: 2010-05-27T18:06:55+09:00 Subject: Re: file copy John Wu wrote: > > 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? It seems everything is ok in my computer! -- Posted via http://www.ruby-forum.com/.