SetFileTime Method  
 

Changes the modification date and time for a file on the server.

Syntax

object.SetFileTime( RemoteFile, FileTime )

Parameters

RemoteFile
A string that specifies the name of the file on the server. The filename cannot contain any wildcard characters and must follow the naming conventions of the operating system the server is hosted on.
FileTime
A string that specifies the new date and time for the file. The date must be in a format recognized by the local system, otherwise an error will occur. The date and time value must also be specified in UTC (Coordinated Universal Time), not local time.

Return Value

A value of zero is returned if the operation was successful, otherwise a non-zero error code is returned which indicates the cause of the failure.

Remarks

The SetFileTime method changes the modification date and time for the specified file on the server. When connected to an FTP server, this method uses the MTDM command to change the modification time for the file. If the server does not support this command, the method will return an error. Note that some servers only support the MDTM command to return, but not change, the file modification time.

See Also

Localize Property, GetFileStatus Method, GetFileSize Method, GetFileTime Method