Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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

Replies are listed 'Best First'.
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.
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?

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?
LanX LOLs
[perldigious]: If you want a linguistic adventure...
[perldigious]: No offense to any Scotsman, I love Scots. Well actually, I love Scotch, but I'm sure the people are great too. :-P
[Discipulus]: perldigious i understand i word on ten, to be optimistic..
LanX will try to give his next LPW talk with a Cogney intonation
[Discipulus]: if you love Scotch in scotland your safety will be.. glengranted
[LanX]: *Cockney

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-06-23 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (552 votes). Check out past polls.