Whether it is possible to delete a file when it is open depends more on the program in which the file is open than the type of file. If the application, for example, simply reads the contents of the file and then closes the file (for example, Notepad), you can delete the file while it is "open" (which means that it is displayed in Notepad). On the other hand, Excel saves the file in an open way, which usually cannot even be copied.
source share