From: daz Date: 2004-03-16T16:04:34+09:00 Subject: Re: How can I copy a read-only file? > Curt Hibbs wrote: > > I've got a generic method that copies files. I want to preserve the > > attributes of the source file in the destination file. I started using this: > > > > require "ftools" > > ... > > File.copy(src_file, dest_dir) > > > > This works until I encounter a read-only file, then I get an exception: > > > > c:/ruby/lib/ruby/1.8/ftools.rb:23:in `initialize': > > Permission denied - E:\Dev\RubyDev\rubyinstaller\c > > vs-repo\installer\stable/doc\DBD/ODBC-0.96/COPYING > > (Errno::EACCES) > Perhaps you've repeated the copy and you already have a read-only version in your dest directory which ftools is trying to *write* to ?? daz