Windows

How to Fix Access Denied File In Use Error

It is frustrating when you try to rename a folder or file or access a folder or file and you receive the error message that basically states, something or someone has this file or folder locked and you cannot make changes to it.  The error message may look something like the error below.

accessdenied1

What Windows does not do, is tell you what or who has a lock on the file or folder so you can troubleshoot further.  That is where the tool provided by Sysinternals called Process Explorer comes in.  If you receive the error above, most likely there is a process or handle that has a hold on the file or folder that is keeping the system from allowing changes to be made.  Process Explorer allows you to see these otherwise hidden processes or handles on these objects and also allow you the ability to close them.

  • Download and install Process Explorer
  • Run PE and navigate to the Find > Find Handle or DLL.. menu shown below

accessdenied2

 

We can then search for the file or folder name that we are having issues with.

  • After you navigate to the “Find Handel or DLL” menu
  • Type in the file or folder name in the “Handle or DLL substring” field, then click “Search.”

accessdenied3

 

The dialog box above shows the results below the search field.  The Process, PID, Type, and the location are all displayed so you can see what has control over your file or folder.  If you double click the item(s) listed, it will jump you to the highlighted listing shown below, where you can close the handle.

  • Highlight the item, right click, and choose Close Handle

accessdenied4

 

Final Thoughts

Armed with the Process Explorer utility from Sysinternals, you will no longer be left in the dark on what is keeping you from accessing or renaming/modifying your file/folder.  Also, this will help to save on any unplanned reboots of a Windows machine, just to clear up a hold on a file or folder.  This is especially valuable on a Server where system uptime is critical.

 

 

Back to top button