From: Kurt Euler Date: 2002-08-14T16:51:41+09:00 Subject: How to use the safe_unlink method? This is a multi-part message in MIME format. --Boundary_(ID_j7gi9NAqq+h7oMYP8MHkUA) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT All- I'm trying to write a progam that will delete all files in a directory. Here's a test program using safe_unlink with which I'm trying to delete all files in the immediate subdirectory (output) to the program: require 'ftools' File.safe_unlink(".\output\*.*") When I run this program, nothing happens, not even an error. No files are delete anywhere. In an earlier question about deleting files, a couple of you wrote a several-line procedure without mentioning the safe_unlink method. I since read a bit about this method, so I thought I'd ask about it directly. Thanks a bunch! --Boundary_(ID_j7gi9NAqq+h7oMYP8MHkUA) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT
All-
 
I'm trying to write a progam that will delete all files in a directory.
 
Here's a test program using safe_unlink with which I'm trying to delete all files in the immediate subdirectory (output) to the program:
 
   require 'ftools'
   File.safe_unlink(".\output\*.*")
 
When I run this program, nothing happens, not even an error. No files are delete anywhere.
 
In an earlier question about deleting files, a couple of you wrote a several-line procedure without mentioning the safe_unlink method. I since read a bit about this method, so I thought I'd ask about it directly.
 
Thanks a bunch!
--Boundary_(ID_j7gi9NAqq+h7oMYP8MHkUA)--