From: "SHIGETOMI, Takuhiko" Date: 2005-09-27T17:57:20+09:00 Subject: Re: changing permissions in windows XP using ruby!! hi, i am still get confused. but... maybe... require 'fileutils' FileUtils.rm( path ) or FileUtils.rm_f( path ) ... would help you. it's worth to try. on my pc, they worked as i expected. let me put the additional information. FileUtils.chmod( ... ) also did not work. it seems to be same as File.chmod. > Hi guys, > > I am writing an application in ruby ([U]to run in windows XP[/U]) that > does the normal File System stuff like creating/editing/removing files and > directories. at the start it was all good as making files and directories > is pretty easy in ruby and classes File and Dir already have all the > methods you need. but when it comes to removing/moving/unlinking these > files and folders. I get a "permission denied" error... I check the > permissions to the files or folders I created they look like this: > > drwx------+ 2 Administ None 0 Sep 27 18:36 dir1 > -rwx------+ 1 Administ None 12 Sep 27 18:36 file1.rb > > I tried to give permissions to everyone (as I would do in Linux using > chmod 0777 filename) by using the code: > > f = File.new(path, "a+") > puts File.chmod(0777,path) > > > but it doesn't change anything. so I thought maybe the permission bits are > different in windows from linux. anyways I spent too much time on this and > got nowhere. can anybody help me on this? xnfp://void/3d/universe/milky-way-galaxy/orion-arm/sol-solar-system/ 3rd-planet/fareast/jp/tky/shigetomi.takuhiko.5618