Disk Management

How do I delete an "undeletable" file?

Sometimes you want to delete a file but when you do so an error message pops and tells you it cannot be done.

Method #1 – Kill explorer.exe

Do successfully delete an undeletable file that is caught be the explorer.exe process (and most of them are) do the following:

  1. Open a Command Prompt window and leave it open.
  2. Close all open programs.
  3. You now need to close EXPLORER.EXE. The proper way to shutdown Explorer is to raise the “Shut Down Windows” dialog (select “Shut Down…” from the start menu), hold down CTRL+SHIFT+ALT and press the CANCEL button. Explorer will exit cleanly.

Note: The <CTRL+SHIFT+ALT> at the ‘Shut Down Windows’ dialog method of closing Explorer is built into Explorer. (It was specifically designed so that developers writing Shell Extensions could get Explorer to release their Shell Extension DLLs while debugging them).

  1. Go back to the Command Prompt window and change to the directory where the undeletable file is located in. At the command prompt type DEL <filename> where <filename> is the file you wish to delete.
  2. Go back to Task Manager, click File, New Task and enter EXPLORER.EXE to restart the GUI shell.
  3. Close Task Manager.

(Tip modification submitted by James R. Twine who has a great utility called Delete FXP Files that can help you delete files and folders that simply won’t go away).

Sponsored Content

What is “Inside Microsoft Teams”?

“Inside Microsoft Teams” is a webcast series, now in Season 4 for IT pros hosted by Microsoft Product Manager, Stephen Rose. Stephen & his guests comprised of customers, partners, and real-world experts share best practices of planning, deploying, adopting, managing, and securing Teams. You can watch any episode at your convenience, find resources, blogs, reviews of accessories certified for Teams, bonus clips, and information regarding upcoming live broadcasts. Our next episode, “Polaris Inc., and Microsoft Teams- Reinventing how we work and play” will be airing on Oct. 28th from 10-11am PST.

Method #2 – Unlocker

Another cool tool that will allow you to delete any undeletable file is Unlocker (author’s web site can be found HERE).

After installing the tool you will get a new context menu option when right-clicking any file in Windows Explorer.

If the folder or file is locked, a window listing of lockers will appear:

Simply click Unlock All and you are done!

Download Unlocker 1.8.5 (192kb)

Further Reading

You might also want to read the following related articles:

Related Topics:

BECOME A PETRI MEMBER:

Don't have a login but want to join the conversation? Sign up for a Petri Account

Register
Comments (0)

Leave a Reply

External Sharing and Guest User Access in Microsoft 365 and Teams

This eBook will dive into policy considerations you need to make when creating and managing guest user access to your Teams network, as well as the different layers of guest access and the common challenges that accompany a more complicated Microsoft 365 infrastructure.

You will learn:

  • Who should be allowed to be invited as a guest?
  • What type of guests should be able to access files in SharePoint and OneDrive?
  • How should guests be offboarded?
  • How should you determine who has access to sensitive information in your environment?

Sponsored by: