Access Is Denied Error Message When You Try To Delete A File/Folder

by [Published on 7 Jan. 2009 / Last Updated on 23 Sept. 2008]

This article explains how you can use Process Explorer, a tool from Sysinternals (now subsidiary of Microsoft), to kill the lock on files and folders.

You will get "Access Is Denied" error message when you try to delete a file or folder. This happens when file or folder is being used by processes running in the system and you do not know which process it is!

Windows doesn't ship with any tool that can be used to find out which process is locking up the file or folder. You need to use Process Explorer tool to find the lock on the file and then kill the lock so that you can delete the file and folder.


  • Download Process Explorer at here (
  • Note the file name or folder you're trying to delete 
  • Run Process Explorer > Find > Find Handle > Enter the file or folder name in "Handle or DLL Substring" Dialogue box
  • Click on Search
  • Right Click on the handle and then click "Close Handle" > Press Yes when promoted.

Now you can successfully delete the file or folder you are trying to delete.

See Also

The Author — Nirmal Sharma

Nirmal Sharma avatar

Nirmal Sharma is a MCSEx3, MCITP and was awarded the Microsoft MVP award in Directory Services and Windows Networking. He specializes in Microsoft Azure, Office 365, Directory Services, Failover Clusters, Hyper-V, PowerShell Scripting and System Center products. Nirmal has been involved with Microsoft Technologies since 1994. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles on various sites and contributing to PowerShell-based Dynamic Packs for www.ITDynamicPacks.Net solutions.

Featured Links