SetCreationTime(FileName: String; CreationTime: DateTime);
FileName - path and name of the file, which date and time of creation must be changed.
CreationTime - date and time that must be set.
The SetCreationTime method changes date and time of file creation passed by the FileName parameter.
Sub Main;
Begin
If File.Exists("c:\New_folder\1.txt") Then
File.SetCreationTime("c:\New_folder\1.txt", DateTime.Now);
End If;
End Sub Main;
After executing the example, creation date of the 1.txt file is changed to the current date.
See also: