SetLastWriteTime(FileName: String; LastWriteTime: DateTime);
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.
The SetLastWriteTime method sets date and time of the last edit of a file.
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: