Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Welcome to the Monastery
 
PerlMonks  

Re: ftp folder creation date

by aitap (Chaplain)
on Nov 19, 2012 at 17:30 UTC ( #1004587=note: print w/ replies, xml ) Need Help??


in reply to ftp folder creation date

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.


Comment on Re: ftp folder creation date
Select or Download Code
Re^2: ftp folder creation date
by Anonymous Monk on Nov 20, 2012 at 07:24 UTC

    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.

        Yes, FTP is ugly, in more than one aspect. Things get much worse when the FTP server runs on DOS, Windows or Netware. The "human readable" output often is readable, but far from anything you would expect from an FTP server running on Unix.

        baskar_79, could you connect using SSH and use SFTP instead? SFTP has atime/mtime/ctime, since at least version 4 (dated 2002). As a nice side effect, you get encrypted transfers and you could switch from passwords to public key authentication.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2014-04-16 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (431 votes), past polls