Author Topic: Maintaining File date/time stamps  (Read 3807 times)

corourke

  • Jr. Member
  • **
  • Posts: 5
Maintaining File date/time stamps
« on: December 18, 2006, 08:50:40 PM »
I want to be able to upload files to a hosted FTP server (godaddy and/or lunar pages) and have the file modification dates be set the same as they are on my mac.

After reading a few posts, it seems that SFTP will handle this correctly, FTP will not, unless you set "Use MDTM to set server dates" in the advanced preferences AND your server supports it.

So, if my server does not support SFTP nor MDTM, am I out of luck?

Thanks,
Cameron


JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Maintaining File date/time stamps
« Reply #1 on: December 19, 2006, 02:07:54 AM »
Yes, that's correct

Christian Roth

  • Jr. Member
  • **
  • Posts: 7
Re: Maintaining File date/time stamps
« Reply #2 on: June 12, 2007, 05:29:53 PM »
Adding to this: Assuming my server does support SFTP, and I have uploaded the files already. Is there a way to modify the dates of the uploaded files? I'd be happy with a raw FTP command if necessary, as it seems that the YFTP interface does not feature such an option.
Yummy FTP 1.6.1b2

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Maintaining File date/time stamps
« Reply #3 on: June 12, 2007, 06:03:09 PM »
You can interact directly with the server via the command line interface which is part of the FTP Transcript - select 'Show FTP Transcript' from the View menu and enter appropriate FTP commands into the displayed text area.

If your server supports the MDTM command then you can set the file dates this way:

MDTM 20070612225844 filename

The number format is: year/month/day/hour/minue/second

but the slash character "/" isn't included

I don't recommend working in the command line environment unless you'ver very familiar with the FTP protocol, though...

Christian Roth

  • Jr. Member
  • **
  • Posts: 7
Re: Maintaining File date/time stamps
« Reply #4 on: June 13, 2007, 08:19:11 AM »
Unfortunately, as expected, MDTM only allows reading the info, not writing it (ftp) resp. is not supported at all (sftp - at least it seems so) on my provider.

Next best thing probably is to set the dates locally, then upload with the "set time" option to see if that would work.

Thanks for your detailed help!

-kris
Yummy FTP 1.6.1b2

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Maintaining File date/time stamps
« Reply #5 on: June 13, 2007, 09:01:12 AM »
The "set time" option isn't magically going to work - all it does it use the MDTM command. So, if your server doesn't support that command for setting the dates then it's simply not going to be possible to do it.

If your server supported SFTP, however, then this would 'just work'. To be clear, setting dates with SFTP doesn't involve any MDTM command - that is specific to the FTP protocol only. The date/time setting capability is a built-in part of the SFTP protocol.