Re: Handling OLD files



below peace of code u list of files, sorted according the date ""

@lfiles = grep {stat($_)->mtime() < $date} @files;


================================================

On Fri, Mar 28, 2008 at 5:08 PM, Robert (bloo) <
i.have.no.real.name@xxxxxxxxx> wrote:

Sandy wrote:
On Mar 27, 1:40 pm, anders.u.pers...@xxxxxxxxx (Anders) wrote:

I am looking for a way of moving files older than a date,
I am need this in a script for moving/erase old files from a
production machine


Try using File::Find
http://search.cpan.org/~nwclark/perl-5.8.7/lib/File/Find.pm<http://search.cpan.org/%7Enwclark/perl-5.8.7/lib/File/Find.pm>

/sandy
http://myperlquiz.com/



Or, you could use the built in "stat" function. It can get a lot of
information on a file.

perldoc -f stat

--
To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail: beginners-help@xxxxxxxx
http://learn.perl.org/





--
Regards
Santosh Patil


Relevant Pages

  • Re: tkinter button widget
    ... > I've got a script where a button gets pushed over and over: ... > carpal tunnel syndrome I'd like to have the button respond to presses of the ... Michael ...
    (comp.lang.python)
  • tkinter button widget
    ... I've got a script where a button gets pushed over and over: ... carpal tunnel syndrome I'd like to have the button respond to presses of the ... Muchas gracias. ... Peace ...
    (comp.lang.python)
  • Re: Importing file.csv into Access using a VBS
    ... I have included below a peace of my script and I'm getting ... oDB.Execute strSQL ... Prev by Date: ...
    (microsoft.public.access.externaldata)
  • Re: Help Required - Script for domain last login time
    ... Check about how to force it before running your script, or simply filter the ... adyda for peace ...
    (microsoft.public.scripting.vbscript)