Exists(FileName: String): Boolean;
FileName — path and name of the file, which existence must be checked.
The Exists method returns whether the file exists.
Sub Main;
Var
s: String;
Begin
If File.Exists("c:\New_folder\1.txt") Then
s:="Yes";
Else
s:="No";
End If;
End Sub Main;
After executing the example, the "s" variable contains Yes, if the 1.txt file exists.
See also: