Icon FileDelete

Unit: Internal

Available In: Server Applications

procedure FileDelete(const FileName: String)

The FileDelete procedure deletes the file specified in the input parameter. If the file cannot be deleted for any reason, an exception will be raised.

Information The specified file name should contain an absolute path. Relative paths are permitted, but they rely on the current working directory. The current working directory is a per-process setting and is not reliable in a multi-threaded setting like the web server.

Examples

if FileExists('C:\temp\test.html') then
   FileDelete('C:\temp\test.html');
Image