Submit a ticketCall us

Looking to compare latest NPM features with previous versions of NPM?
The NPM new feature summary offers a comparison of new features and improvements offered with this release.

 

Home > Success Center > Serv-U Managed File Transfer & Serv-U FTP Server > Enable the MDTM command to preserve the original time stamp of uploaded files

Enable the MDTM command to preserve the original time stamp of uploaded files

Table of contents

Updated April 11, 2017

Overview

This article describes how to preserve the original time stamp of an uploaded file using the MDTM command. With the MDTM command, any FTP client that also supports this command can upload a file and preserve the time and date stamp on the file.

 

At the time of this writing, not many FTP client programs support the MDTM command. FTP Voyager supports this command. The command line FTP client lets you send this by adding the MDTM command, using the format mdtm 19980525162603 file.txt.

 

This command originates in UNIX and lets you query the server for the modification date and time of a file or directory. Unlike UNIX, the Serv-U FTP also lets the client set the modification date and time of files on the server, if the user has sufficient access rights. This is useful in synchronizing uploaded files with those on the client.

Normally, the FTP gets the date the files were created on the server and has no way to explicitly set the date of uploaded files. MDTM lets the client change that so they get the date of the original file on the server. This also works for directories.

 

The syntax to set the date and time is MDTM yyyymmddhhmmss[+-xxx], where yyyymmddhhmmss is a line of text with the year, month, day, hour, minutes, and seconds the file should get set to. The [+-xxx]part is optional time zone information of the FTP client, in minutes relative to UTC. If the client provides this information, the Serv-U FTP converts the date and time to the local time at the server. Dates and times are kept consistent. For example, a file created at 04:00 EST will be created at 10:00 CET. If time zone information is unavailable, the Serv-U FTP assumes the local time at the server.

 

As an example, if the client is in the Eastern US during summer time, entering MDTM 19980719103029-240 sets the date and time to 19 July 1998, 10:30 AM 29 seconds, and indicates that the client is 240 behind UTC.

Environment

All Serv-U versions

Steps

  1. Open the Serv-U Management Console.
  2. Select the domain you have set up.
  3. Select Limits & Settings > FTP Settings.
  4. Double-click the MDTM command.
  5. Go to the Information tab and verify that the MDTM feature is enabled.

 

 

Last modified
00:53, 11 Apr 2017

Tags

Classifications

Public