By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,692 Members | 1,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,692 IT Pros & Developers. It's quick & easy.

Is there a perl method for retrieving the create date of remote files via FTP?

P: 3
The perl::ftp's mdtm method returns the last mod date of a specified remote file. We've found that on our sftp server, the last mod date is often earlier than the date and time the file is actually received. We need to record the date received, but what we are getting is (i believe) the file's creation date on some remote server. What we want is the date and time the file is placed on our server.

Here's the current syntax used:
my $FtpGMTimeInt = $FTP->mdtm($FtpFromFile);

Any suggestions?
Jan 6 '10 #1
Share this Question
Share on Google+
3 Replies


Expert Mod 100+
P: 589
What is the OS of the FTP server?

There are 3 timestamps ctime, mtime, and atime which loosly means
ctime = creation
mtime = modification
atime = access

However, *nix servers don't actually maintain the file creation timestamp. The ctime on *nix servers is the timestamp when the inode was last updated. Changing file permissions or ownership will change the ctime.

The mtime is the timestamp when the contents/data in the file was last changed.
Jan 6 '10 #2

P: 3
Hi Bob,
First thanks for getting back to me. I do understand the 3 dates available. What is as yet unclear is whether any ftp command will allow me to retrieve the 'cdate' instead of the mdate.
Also, I'm assuming a '*nix' server is shorthand for unix, linux, posix, etc.

Regards,
AlfredE
Jan 6 '10 #3

P: 3
I believe it is an NT server, but I am unsure. We use both in our environment.
Jan 6 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.