IFile.SetCreationTime

Syntax

SetCreationTime(FileName: String; CreationTime: DateTime);

Parameters

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

CreationTime - date and time that should be set.

Description

The SetCreationTime method changes date and time of file creation passed by the parameter FileName.

Example

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 this example, creation date of the file 1.txt is changed to a current date.

See also:

IFile