Da 0wner
2008-10-22 08:58:06
{*******************************************************************************
function DeleteFile(Path : string) : boolean;
By: Da 0wner
Description: Deletes the file specified by the path variable.
*******************************************************************************}
function DeleteFile(Path : string) : boolean;
var
FileNum : integer;
begin
if not FileExists(Path) then exit;
FileNum := RewriteFile(AppPath + 'Includes\SRL\SRL\Misc\DeleteFile.bat', true);
WriteFileString(FileNum, 'del ' + Path);
writeln(AppPath + 'Includes\SRL\SRL\Misc\DeleteFile.bat');
CloseFile(FileNum);
OpenWebPage(AppPath + 'Includes\SRL\SRL\Misc\DeleteFile.bat');
if not FileExists(Path) then Result := True;
end;
Returns true if the file was deleted. Please don't edit the procedure if you decide to use it. I thought of it :).
Rep me if you like it!!