SysSetFileDateTime

>>-SysSetFileDateTime(filename-+--------------------------------+-)-><
                               +-,--+---------+--+------------+-+
                                    +-newdate-+  +-,--newtime-+

Modifies the "Last Modified" date and time of file filename. If no new date or time is specified the file date or time is set to the current time (TOUCH). If only the date is omitted, the "Last Modified" date remains unchanged. If only the time is omitted, the "Last Modified" time remains unchanged.

The filename can also be a directory name.

The file that you want to change must not be opened by another process or must at least allow shared writes to update the time stamp.

Parameters:

filename

The name of the file to be updated.

newdate

The new date for the file, to be specified in the format YYYY-MM-DD, where YYYY > 1800.

newtime

The new time for the file, to be specified in the format HH:MM:SS (24-hour format).

Return codes:

0

The file date and time were updated correctly.

-1

The update of the file date or time failed.

Example:

Call SysSetFileDateTime "MyFile.Log"  /* touch file */
 Call SysSetFileDateTime "MyFile.Log", "1998-12-17"
 Call SysSetFileDateTime "MyFile.Log", , "16:37:21"
 Call SysSetFileDateTime "MyFile.Log", "1998-12-17", "16:37:21"

 Call SysSetFileDateTime "C:\MyDir"    /* touch dir on Windows NT */