Cannot delete <file or folder>: It is being used by...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know how to fix this problem if it comes up, but does anyone know how to
avoid it, and maybe even why it happens? I would really like to know how to
prevent it happening so that I don't have to take time fixing it when it does!
 
There really is no way to prevent this from happening. This happens because
some program has an open handle to the file. As an example suppose you
started a command shell and moved to the folder c:\yourfolder. While this
program was still running if you went to explorer and tried to delete the
folder you would get this error message.

Typically you would need to find the program using this file and close it
after which you would be able to do this. In the worst case (If you wanted
to delete a file that is being used by an operating system process) you may
have to reboot the system but this is not a typical scenario.

There are tools available that will tell you which process needs to be shut
down to delete a file. Try
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/oh-o.asp
if this is a recurring problem for you.
 
That is very frustrating. For me, it is mostly Explorer.exe that has the
open handles...what I can't figure out is why it keeps them open even after I
close the window that I am exploring the folder in, even after everything has
been emptied from the recycle bin and/or moved. There must be a reason for
this...maybe it is still kept in the paging file? I don't know why that
would be, though, because most of the time I have more than enough free
physical memory to hold anything I would be deleting or moving.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top