Hello, I am writing a custom log parser for our Squid proxy, and I have
run into some problems with trying to use a temporary directory.  The
script parses all the logs, dumping those that are of interest to us for
the various parts of the report to smaller, easier to handle files.  I
am using the following statement to create a temporary directory which
works out great, removing most of the files, unfortunately I can not
seem to make it remove all the files.

our $templogs_base = 'C:\squid\var\log\SquidLog';
our $templogs = tempdir( DIR => $templogs_base, CLEANUP => 1 );


When I run the script, I get the following errors:

Can't unlink file C:\squid\var\log\SquidLog\5FIwr0r4nz/tmp-stb.com.txt: Permission 
denied at C:/SFU/Perl/lib/File/Temp.pm line 845
Can't remove directory C:\squid\var\log\SquidLog\5FIwr0r4nz: Directory not empty at 
C:/SFU/Perl/lib/File/Temp.pm line 845

I have thought about manually running unlink on all the files contained 
within that directory, however that seems like an ugly kludge to force
the removal of the temporary directory.

Can anyone shed some light on a clean way to do this?

Tim Donahue



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to