From: Ronald Fischer Date: 2007-06-05T17:04:58+09:00 Subject: Re: Deleting a file - is there a less clumsy way to do this? > > In Perl for instance, I would simply write > > > > unlink filename; > > > > and implicitly void the result... > > Note that this approach would silently fail on MS Windows if another > process had an open handle on the file in question, i.e. the file > _does_ exist, but you did not delete it. Does it really? I tried the following: (1) Created a file xx (2) From a cygwin bash shell, made a tail -f on the file. (3) Started an editor (Scite) on that file. Made some changes to the file. Saved them. Made more changes in the editor. Now there should be two open handles on the file: At least the tail -f, and very likely also from Scite (though this depends on how Scite is implemented). Now, from irb, I did a File.delete 'xx' Went well. No ecxeption. File was deleted afterwards. Ronald -- Ronald Fischer Phone: +49-89-452133-162