Delete;
The Delete method deletes a file.
Sub UserProc;
Var
FileSInfo: IFileSystemInfo;
Begin
FileSInfo:=New FileInfo.Attach("c:\1.txt");
If FileSInfo.Exists Then
FileSInfo.Delete;
End If;
Dispose FileSInfo;
End Sub UserProc;
After executing the example the 1.txt file is deleted if it exists.
See also: