GetLastWriteTime(FileName: String): DateTime;
FileName — path and name of the file, which date and time of the last change must be found out.
The GetLastWriteTime method returns date and time of the last edit of a file.
Sub UserProc;
Var
d: DateTime;
Begin
If File.Exists("c:\New_folder\1.txt") Then
d:=File.GetLastWriteTime("c:\New_folder\1.txt");
End If;
End Sub UserProc;
After executing the example, the "d" variable contains date and time of the last change of the 1.txt file if it exists.
See also: