tsreddy has asked for the wisdom of the Perl Monks concerning the following question:

I need a script to get the file name from the directory "c:\FindFile" which is created today. This folder consists of ABS<rest>.xls and XYZ<rest>.xls files..so there will be two files one for each eceryday in the directory. Can anyone help with perl script. This is on windows...

Replies are listed 'Best First'.
Re: File Created Today in a Dir
by Tanktalus (Canon) on Jun 19, 2008 at 19:46 UTC

    Do you want help with the perl script, or help by being given a perl script?

    Assuming the former, what have you tried? Or do you need some hints to get started? See: glob and -M, combined with grep... that should be everything you need.

    If you mean the latter, you've come to the wrong place...

Re: File Created Today in a Dir
by pc88mxer (Vicar) on Jun 19, 2008 at 19:43 UTC
    It seems that the file names contain some indication of what date they were created on. Is that right? If so, you have two options:
    • Use the name of the file to determine its creation date
    • Use the system's last modified time (assuming the files don't get modified after they are created.)

    Am I on the right track? If you want to use the first approach we need to know what the <rest> of the file names look like.