Checks whether a specified file exists.
If the file name includes a directory name, the file is opened in the specified directory. Otherwise, Silk Performer searches for the file in the directory where the test script is located, in the data directory, in the results directory and in the project directory.
Kernel.bdh
FExists(in sFileName: string): boolean;
true if the file exists
false otherwise
Parameter | Description |
---|---|
sFileName | Name of the file |
dcltrans transaction TMain begin // check whether the file "autoexec.bat" exists // in the C root directory if FExists("c:\\autoexec.bat") then write("file autoexec.bat exists"); writeln; else write("no autoexec.bat file"); writeln; end; end TMain;
file autoexec.bat exists