Deletes the specified file.
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
FDelete( in sFileName: string ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
sFileName | Name of the file |
dcltrans transaction TMain const scFileName := "c:\\temp\\dummyfile.txt"; var hFile: number; begin // create new file FOpen(hFile, scFileName, OPT_FILE_ACCESS_READWRITE, OPT_FILE_CREATE); FClose(hFile); write("new file created"); writeln; // delete file FDelete(scFileName); write("file deleted"); writeln; end TMain;
new file created file deleted