in reply to Re: Re: Deleting a running script
in thread Deleting a running script

waswas-fng gave you the answer. You need to have the last few lines of your program create a batch file. The batch file looks something like:
del script.exe del batch.bat
The final line of code would be:
exec ("batch.bat");
Why is it important for the executable to delete itself anyway?