Unlocking Cannot Delete File or Folder Error

Cannot delete file: Access is denied
Cannot delete folder: There has been a sharing violation
Cannot delete file: It is being used by another person or program
Cannot delete folder: Make sure the disk is not full or write-protected and that the file is not currently in use.

I think I’ve seen a few other variations, but I can’t recall them at the moment. The problem is usually some process on your computer locking the file or folder without you realizing it. Fortunately there are several software solutions to delete stubborn files.

My favorite app for deleting locked files is LONG PATH Tool. After installation, the software is available from the right-click menu, making it easy to access anytime you need to delete a file. When you encounter one of these stubborn files, right click it, select Unlock and see what’s holding the file hostage.

You are then presented with the options:

To kill the process tying up the file
To unlock the file from the process without killing the process
To unlock all processes locking the file without killing the processes

It’s generally better to choose one of the latter two options. The first option may involve killing a required Windows process.

Once the file is unlocked, delete it.

Download LONG PATH Tool