From: "Pablo Q." Date: 2008-07-10T07:39:33+09:00 Subject: Re: How to delete a file in Win XP ------=_Part_3648_5001437.1215643403916 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Another solution could be use a system call: `DEL #{file}` or system("DEL #{file}") it returns true or false. 2008/7/9 Luis Lavena : > On Jul 9, 8:12 pm, MAwiniarski wrote: > > 1. I'm in a proper directory (using: puts Dir.entries(Dir.pwd) > > 2. File do not need to be closed, because it haven't been open (it's > > just file in a folder) > > 3. Error message: > > Errno::EACCES: Permission denied - file > > 4. I've used chmod in previous line: > > File.chmod(0644, file) > > chmod return flag: 1 (one) > > 5. Using File.delete or File.unlink gives same error message > > > > File.chmod has no effect on Windows. > > Can you ensure that, from the command line, safely remove that file? > Even if not you the one that openned the file, maybe other part of the > OS are locking it so you can't perform the delete operation safely. > > HTH, > -- > Luis Lavena > > -- Pablo Q. ------=_Part_3648_5001437.1215643403916--