Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Need efficient way to fetch 20 last modified files from folder

by Anonymous Monk
on Aug 24, 2012 at 22:55 UTC ( [id://989654]=note: print w/replies, xml ) Need Help??


in reply to Need efficient way to fetch 20 last modified files from folder

chomp(my @newest = (`dir /A-D /O-D /D`)[5 .. 24]); # lines 0 - 4 - hea +der say for @newest;
If for Windows only, the switches,

/A-D files only /O-D ordered from newest to oldest /D output in column

Don't know if this will be faster for you. Type help dir at your command prompt.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://989654]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-29 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found