Questions

Unlocking files on Windows 2003 server

+
1 Votes
Locked

Unlocking files on Windows 2003 server

tscjparker
Is there any way to unlock files in Windows 2003 server without rebooting the server?

I am referring to files that are locked by a process, rather than a user. When trying to change the file, users receive an error. The files are usually Word docs or the like; these are not OS system files or anything like that.

For example, when trying to rename, this error is received "Cannot rename <filename>: it is being used by another person or program."

When managing to the server via Computer Management and checking the Open Files, these files do not appear on the list.

I have found several 3rd party utilities that can be used for unlocking files, but I am looking for a native way to do it within Windows.

Any ideas would be appreciated.
  • +
    1 Votes
    lspearsNOSPAM

    I'm not aware of a native Windows tool that will do this. Not sure why MS hasn't provided something, but ..

    I have had success using Process Explorer from Sysinternals (http://www.microsoft.com/sysinternals, look at the process tools link). It's free, recommended by MS (multiple Q articles on uses for the tool), etc. It allows you to see all running processes, and has a Find -> Handle or DLL option. You can search for all or part of your locked file, and Process Explorer will show the process that has it held open. Once you have found the process, PE allows you to close open handles, which will then allow you to delete the file in question. Be aware that closing some handles can result in critical processes being terminated, so use this with caution. I've specifically seen issues when the process in question is a backup agent thread. You may want to log on to the console session to ensure any session 0 pop-up messages are visible when closing handles (Start - Run - mstsc /console).

  • +
    1 Votes
    lspearsNOSPAM

    I'm not aware of a native Windows tool that will do this. Not sure why MS hasn't provided something, but ..

    I have had success using Process Explorer from Sysinternals (http://www.microsoft.com/sysinternals, look at the process tools link). It's free, recommended by MS (multiple Q articles on uses for the tool), etc. It allows you to see all running processes, and has a Find -> Handle or DLL option. You can search for all or part of your locked file, and Process Explorer will show the process that has it held open. Once you have found the process, PE allows you to close open handles, which will then allow you to delete the file in question. Be aware that closing some handles can result in critical processes being terminated, so use this with caution. I've specifically seen issues when the process in question is a backup agent thread. You may want to log on to the console session to ensure any session 0 pop-up messages are visible when closing handles (Start - Run - mstsc /console).