Error Deleting File or Folder? Delete an in-use (locked) file

 

How often have you come across a message like, “Error Deleting File or Folder” while trying to delete one? For me, it’s been a frequent occurence while trying to get rid of some spyware file that I spotted on my system and invariably on each occasion I’ve been rebuffed with a message like that. To add to the frustration, no further details are provided about WHY such an error crept us, except for maybe a little elaboration on the lines of…

“Cannot delete file: Access is denied. Make sure the disk is not full or write-protected and that the file is not currently in use.”

Error Deleting File or Folder

Pretty insightful, eh ? The message comes in various other flavours too…

  • There has been a sharing violation.
  • The file is in use by another program or user.
  • The source or destination file may be in use.

Such misbehaving executables / files can be quite difficult to get rid of and for the really desperate it might involve quite a few reboot-delete-reboot or reboot into safe mode-delete-reboot cycles. Wastage of time & effort if you ask me. Isn’t there any way out of this mess?

Well fear not, for there are quite a few handy utilities out there which can do the same for you in one swift stroke, without requiring you to reboot anyhow. One such noteworthy application is Unlocker. It’s a freeware that does a real good job of unlocking and deleting such files. IMHO, it might be the best all-rounder in this category.

Once installed, it adds a menu option named “Unlocker” in the right-click context menu that pop-ups when you press the right mouse button in Windows Explorer while pointing at any file or folder. Coolest part is that you would never require to bring up this dialogue manually. When you encounter a locked file, the window pops-up on it’s own and asks you to take an action.

Unlocker Pop-up Menu

Selecting the Unlocker option pop’s up a window showing the locking status of a file or folder, along with a list of processes that are currently maintaining locks on it. Also listed are the handles, process id’s and execution paths of each process.

Unlocker Window Screenshot

You’re provided with three direct action buttons - Kill Process, Unlock and Unlock All. Using Kill, you can kill any particular process in the list. Similarly Unlock will release the lock maintained by a single process while and Unlock All will release all the locks on the file.

Note that, this doesn’t delete the file - it simply removes the locks on it enabling you to safely delete it. For the actual deletion, they’ve provided you with a dropdown box that gives you the option of Deleting / Renaming / Moving / Copying the file in question.

On some rare occasions, the lock cannot be released owing to some complications - there you’re given the option to mark the file for deletion upon reboot. But on 99% cases, you wouldn’t require a reboot.

Lets say with this tool I got a totally new-found sense of freedom on the Windows genre of OS-es. So what are you waiting for? It’s FREE, it’s tiny and it’s as useful as it can be. Get Unlocker today.

14 Responses to “Error Deleting File or Folder? Delete an in-use (locked) file”

  • 1
    On July 6th, 2007 at 5:03 am  |  Permalink
    bandit said:

    gimana cara download na
    pleazz
    kayak mana
    ??????????

  • 2
    On August 31st, 2007 at 10:07 pm  |  Permalink
    Mauricio D. said:

    Love it. It works.

    Keep up the good work!

  • 3
    On September 2nd, 2007 at 6:59 pm  |  Permalink
    miCRoSCoPiC^eaRthLinG said:

    Mauricio: Glad you found the tool useful :) That makes me feel like the review was well worth it.

  • 4
    On October 13th, 2007 at 7:28 pm  |  Permalink
    Art said:

    So, what if this doesn’t do it?
    Pocket Killbox doesn’t either.
    Neither does Microsoft’s ProcessExplorer.

    I’m about to try del /P “PathOfFile” in the safe mode, which just better work!

    Re: AutoCAD files. Apparently they are protected under Windows/XP Professional, but Home Edition is too stupid to deal with it.

    - Art

  • 5
    On December 31st, 2007 at 3:55 am  |  Permalink
    Drew said:

    OMG!! this worked like a charm!! thanks sooo much!!! i have uploaded an .avi file on my gps memory card and the couldn’t delete it. But this program has saved my but from formatting the whole thing!!!!! THANKS A MILLION!!!!!

    Drew

  • 6
    On January 17th, 2008 at 11:23 am  |  Permalink
    miCRoSCoPiC^eaRthLinG said:

    Cheers Drew. Glad you found it so useful. :)

  • 7
    On February 23rd, 2008 at 4:40 am  |  Permalink
    Melissa said:

    Oh, thank you!!! I had a desktop icon that just wouldn’t die.

  • 8
    On April 6th, 2008 at 5:11 pm  |  Permalink
    sami said:

    thank you !!

  • 9
    On June 29th, 2008 at 8:31 am  |  Permalink
    mike paget said:

    Awesome. Tryed to kill some of old icons for a long time and now it is gone.

  • 10
    On July 15th, 2008 at 4:24 am  |  Permalink
    Entreview.com said:

    Error Deleting File or Folder? Delete an in-use (locked) file » Chaos Laboratory…

    If you’ve ever encountered those frustrating locked / in-use files which you’ve been consistently trying to delete, you should read this post….

  • 11
    On July 17th, 2008 at 2:56 am  |  Permalink
    Iain said:

    THIS IS AN EXCELLENT LITTLE PIECE OF SOFTWARE.

    I love it. I have been plagued by such problems for so long now.

    Excellent review.

  • 12
    On July 17th, 2008 at 3:14 am  |  Permalink
    miCRoSCoPiC^eaRthLinG said:

    Thanks Iain. Unlocker is simply too good and bails you out from the tightest corners… :D

    Cheers,
    m^e

  • 13
    On July 30th, 2008 at 8:11 pm  |  Permalink
    iunno said:

    this will not work if a file is in a recursive directory and the folder names are for example c:/program files/configuration.old/configuration.old/configuration.old/… and so on. this appears to be a windows limitation, you’ll have to rename the folder names to something shorter to be able to delete them.

  • 14
    On August 21st, 2008 at 8:40 pm  |  Permalink
    Luke said:

    This does not work with XP Pro x64

Leave a Reply (Fields marked with a * are required.)