Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

To the Devil, Mr. Gates - being used error

  1. Sep 22, 2004 #1


    User Avatar
    Science Advisor

    To the Devil, Mr. Gates - "being used" error

    This error message comes up about 20 percent of the time that I try to change the name of a folder--for instance if I try to rename a folder called gemini_rendezvous, I get: "Cannot rename gemini_rendezvous: it is being used by another person or program. Close any programs that might be using the file and try again." But I am not using anything within the folder. The only solution I have found is reboot. Does anybody else feel my pain?
  2. jcsd
  3. Sep 22, 2004 #2
    In Linux and other *nix systems, you have a command called lsof(list open files), it can tell you what processess are accessing and using a file/folder/device etc.

    If you search, you might be able to find something similar for Windows. A quick google search produced something called "handles", might have a look at that.
  4. Sep 22, 2004 #3
    I find that http://www.sysinternals.com/ntw2k/freeware/procexp.shtml [Broken] is useful. You can use it to find what program(s) are holding a file handle, and you can forcibly kill the handle if necessary.
    Last edited by a moderator: May 1, 2017
  5. Sep 22, 2004 #4
    Turn off the preview feature. When you select a file or folder in MS with preview enabled the OS tryes to generate said preview. Generating this preview is essentially using the file or folder. If you turn off preview(or wait a few moments for the preview to appear) you shouldn't get the error anymore.

    I just ran into this myself while trying to 'fix' my dad's computer. He was having the same problem.
  6. Sep 22, 2004 #5


    User Avatar
    Science Advisor

    Thanks all for the advice. I expect one or more of those procedures will lick the problem the next time it comes up.
  7. Sep 22, 2004 #6
    Personally id just get linux :)
    Ive just had to reformat my windows partition on this computer for about the 11th time since ive had it... probably more, i aint exageratting
  8. Sep 22, 2004 #7
    Occasionally, a crashed program will keep a handle open. Windows generally cleans up handles of forcibly killed processes, but sometimes that doesn't quite work. The only solution in such a case is a reboot.

    There is another, very annoying bug in windows xp related to this. The shell (explorer.exe) will LOCK old DOS-based executables (.exe) whenever you open their containing folder in an Explorer/My Computer window. I think it has something to do with the fact that it tries to open the file to show an icon (stupid made-for-noobs graphical OS), doesn't find icons, and then.... fails to close it? This doesn't happen for Win32 executables.

    In any event, you will NOT get rid of this file handle once you've opened the directory. The handle will remain open until you reboot. To delete the file, you have to reboot and delete it from a command prompt or some other utility. If you're unfortunate enough to place such a file on the desktop, you're out of luck - the desktop is always opened before you can do anything. You'll never be able to delete it unless you reboot in - get this - safe mode with command prompt. (Or you can delete it by booting a different OS / partition).

    Come to think of it, I should probably report this...
  9. Sep 23, 2004 #8
    That actually sounds pretty serious; but if your analysis of the bug really is correct then the tool I posted a link to will allow you to close any file handles that are being held on those DOS files, without having to leave the operating system. You should be able to delete the files at that point.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook