Delete file in use Delphi

0

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.

    
asked by anonymous 10.03.2016 / 17:58

1 answer

-1

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.

    
10.03.2016 / 18:28