SetLastWriteTime(FileName: String; LastWriteTime: DateTime);
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.
The SetLastWriteTime method sets date and time of the last edit of a file.
Sub UserProc;
Begin
If File.Exists("c:\New_folder\1.txt") Then
File.SetLastWriteTime("c:\New_folder\1.txt", DateTime.Now);
End If;
End Sub UserProc;
After executing the example, date and time of the last change of the 1.txt file are changed to the current date.
See also: