Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 (Deacon) 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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-05 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls