------ art_19910_10060579.1200433229230 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Jan 14, 2008 5:45 PM, Martin Martinos <mchabotsol / hotmail.com> wrote: > I want to copy a folder over an existing one. Some files are read-only. > When I do it I get the following error: > > C:/Ruby/lib/ruby/1.8/fileutils.rb:1246:in `initialize': Permission > denied - Folder2/./coco.txt (Errno::EACCES) > > The Folder2/./coco.txt file is read-only > > Here is the code: > > require 'fileutils' > include FileUtils::Verbose > > cp_r('Folder1/.','Folder2') > > > Does anybody has an idea how I can fix this ? I tried the :force option > and it looks like it's not supported. > > Note: I am on a Windows platform. > > Thanks in advance > -- > Posted via http://www.ruby-forum.com/. > > You need to change the permissions, either via the operating system (independently from your script) or do it in your script before you copy. -- "Hey brother Christian with your high and mighty errand, Your actions speak so loud, I can't hear a word you're saying." -Greg Graffin (Bad Religion) ------ art_19910_10060579.1200433229230--