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

ftp folder creation date

by baskar_79 (Initiate)
on Nov 19, 2012 at 13:46 UTC ( #1004541=perlquestion: print w/ replies, xml ) Need Help??
baskar_79 has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I am trying to get the list of directory from the ftp with its creation date. But, i can get the directory list using Net::FTP, as $ftp->ls(), but i need help on getting the creation date of the folder. Please help me on this. Regards Baskar

Comment on ftp folder creation date
Re: ftp folder creation date
by Anonymous Monk on Nov 19, 2012 at 14:27 UTC

    Please help me on this.

    How do you think we can help, what do you think we can do?

Re: ftp folder creation date
by aitap (Chaplain) on Nov 19, 2012 at 17:30 UTC

    That's not so easy. FTP has two ways of transferring file lists: NLST, which transfers only names (and is used in $ftp->ls) and LIST (which can be got using $ftp->dir), which is human-readable and is not described in RFC. The second one can contain the needed dates, but you can have troubles decoding it. (see the RFC 959 for details)

    Use Net::FTP::File to get parsed values from LIST command.

    Sorry if my advice was wrong.

      fstat is listed as a TODO, so not exactly useful

        Tried to connect to my own FTP server using a commandline ftp client, couldn't get anything looking like creation date (only modification date was present) even using STAT command.
        Now I doubt whether this is possible at all.
        Sorry if my advice was wrong.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1004541]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (19)
As of 2014-04-16 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (433 votes), past polls