0

On UN*X systems, I can rename or delete whatever files I want, even they are in use. However, on Windows, when a process is using a file, it cannot be renamed or deleted. If offline files are used, it cannot even be syncked to the server.

Why ain't me allowed to delete/rename opened files on Windows, just like what I usually do on UN*X?

2
  • Because folks who built windows thought it was a good idea? Not sure exactly what you are looking for in the answer, but I don't think there is a technical explanation here.. Not ideal, but as long as you can forcibly close the handle to open file (use one of the sysinternals tools for example), you should be able to delete it. Nov 13, 2014 at 3:58

1 Answer 1

0

Windows needs a open handle to access a file. And when a handle is open you can't delete/renme the open file. Use Process Explorer to search for the open handle and close this handle.

First, start Process Explorer. Press CTRL+F to open a search window. In the 'Handle or DLL substring' field type in a portion or the complete name of the file you are trying to delete and press Enter to begin the search. In my case the file was "08 mer du japon.mp3". You should now be presented with a list of open handles. Next double click on the handle in the search window to show the file handle highlighted in the lower pane along with all the other open handles on the system. Right click the row for the handle and click Close Handle. You should now be good to go.

enter image description here

Not the answer you're looking for? Browse other questions tagged .