IFile.SetLastWriteTime

Syntax

SetLastWriteTime(FileName: String; LastWriteTime: DateTime);

Parameters

FileName - path and name of the file, which date and time of the last change must be changed.

LastWriteTime - date and time that must be set.

Description

The SetLastWriteTime method sets date and time of the last edit of a file.

Example

Sub Main;

Begin

If File.Exists("c:\New_folder\1.txt") Then

File.SetLastWriteTime("c:\New_folder\1.txt", DateTime.Now);

End If;

End Sub Main;

After executing the example, date and time of the last change of the 1.txt file are changed to the current date.

See also:

IFile