IFile.SetLastWriteTime

Syntax

SetLastWriteTime(FileName: String; LastWriteTime: DateTime);

Parameters

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

LastWriteTime - date and time that should 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 this example, date and time of the last change of file 1.txt are changed to the current date.

See also:

IFile