Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Using Net::FTP need to get latest file from the directory ?

by gube (Parson)
on Mar 11, 2009 at 03:10 UTC ( [id://749770]=note: print w/replies, xml ) Need Help??


in reply to Using Net::FTP need to get latest file from the directory ?

Thanks for your reply. Yes i want the latest modification file. I meant ls -rt in linux will show the first file as latest file i need the same to be collected from FTP.

Gubs

  • Comment on Re: Using Net::FTP need to get latest file from the directory ?

Replies are listed 'Best First'.
Re^2: Using Net::FTP need to get latest file from the directory ?
by ig (Vicar) on Mar 11, 2009 at 08:49 UTC

    You can use the ls or dir method to get a list of the files in the directory, then use the mdtm method on each file to get its modification time and select the file with the latest modifiction time.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2026-03-06 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.