Listing a Windows file, getting creation date

From: Bret Goodfellow (Bret.Goodfellow_at_questar.com)
Date: 02/24/05


Date: Thu, 24 Feb 2005 07:32:10 -0700
To: <beginners@perl.org>

Hi all,
 
I am very new to Perl. I have had assembler and Rexx experience on a
mainframe. I would like to be able to use Perl to list a directory, get
the propeties of the files (eg. date created), and keep the newest 3.
The reason I want to do this is because I am running a UDB system that
creates weekly backups. The backups never get deleted unless I do that
by hand. I would like to keep the 3 newest UDB backups. Any help, in
any direction, would be greatly appreciated. Once I get started on
this, I think perl will make more sense to me.
 
The directory structure is:
 
UDB
   Backups
      Folder1
         udbbck01.bak
      Folder2
         udbbck02.bak
      Folder3
         udbbck03.bak
          |
          |
          |
      Folder(n-1)
          udbbck(n-1).bak
      Folder(n)
          udbbck(n).bak
 
Bret Goodfellow
Questar Gas,
S.L.C., UT



Relevant Pages

  • Re: Listing a Windows file, getting creation date
    ... someone who is brand new probably isn't the best way for them to learn. ... I would like to be able to use Perl to list a directory, ... > creates weekly backups. ... I would like to keep the 3 newest UDB backups. ...
    (perl.beginners)
  • Re: Listing a Windows file, getting creation date
    ... Bret Goodfellow wrote: ... I would like to be able to use Perl to list a directory, ... > creates weekly backups. ... Will provide documentation on a specific function. ...
    (perl.beginners)
  • RE: Listing a Windows file, getting creation date
    ... Listing a Windows file, ... I am very new to Perl. ... The reason I want to do this is because I am running a UDB system that ... creates weekly backups. ...
    (perl.beginners)
  • Re: Perl FTP error?
    ... >Still new to perl... ... trying to create an FTP connection to move backups ... files in a foreach loop, calling the method on each file. ...
    (perl.beginners)
  • RE: Antwort: Re: Access into MVS DB2 using DBI or ???
    ... > perl to access a DB2 on a mainframe nor on any other operating system. ... I have done nothing with DB2 on my XP machine. ... > of DBI modules. ...
    (perl.dbi.users)