Does anyone know if it is possible to delete a file in Delphi
, using the DeleteFile
function, when the file is open?
Thank you in advance.
Does anyone know if it is possible to delete a file in Delphi
, using the DeleteFile
function, when the file is open?
Thank you in advance.
There's no way you'd have to do via source code in the onDestroy
event of the Form
so that it changes the name, takes the new changed file, and deletes the old one, this stops executable. For text files it can delete the same file with it open, if you try to save it saves it in the same place that it was deleted.