Thank you for your input.  I have found a resolution to this issue.

> Anthony (Tony) Esposito
> Senior Technical Consultant 
> Inovis(tm)
> 2425 N. Central Expressway, Suite 900 
> Richardson, TX  75080 
> (972) 643-3115 
> [EMAIL PROTECTED] 
> 


-----Original Message-----
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 11:54 AM
To: [EMAIL PROTECTED]
Subject: Re: trying to delete a file if >= 1 day old


Tony Esposito wrote:
> 
> Fellow Perl neophytes ( and non-neophytes),

Hello,

>         I need a little clarification.  I am trying to remove files that
are
> greater that 24 hours old.  The code snippet below is in a 'while' loop
that
> steps through a directory, yet it seems not to work - no files are removed
> no matter what their 'age' ( i.e., their creation time ).  I have stepped
> through the code via the Perl debugger and know the code is being
executed.
> 
>         unlink $file unless -C $file < 1;
> 
>         Another question - is the creation time of a file 'updated'
whenever
> a 'write' to the file is performed or does the creation time remain
static?
> I need a way to delete files based on the file creation time and that time
> needs to be static.

perldoc -f -C
                   -M  Age of file in days when script started.
                   -A  Same for access time.
                   -C  Same for inode change time.


In *nix files do not have a creation time.  You probably want to use -M
instead.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to