Users of Windows 8, 10, and other versions often face the inability to delete a folder or its contents. Few know what to do if files won’t delete, so we’re sharing effective methods to resolve this issue. After reading this guide, you will be able to delete unwanted files as easily as winning at blackjack.
Main Reasons Preventing File or Folder Deletion
A file may not delete for the following reasons:
- It is occupied by a user command or operations, including those running in the background. This means it’s being used by an application or is open in Windows 11.
- Lack of administrator rights. A permission request must be sent, or rights are restricted because Windows 10 cannot apply security measures to change permissions, often due to a non-standard Access Control List (ACL).
- The database is corrupted, or there are issues with the file system path.
Most commonly, the issue arises because the file is open in a program.
How to Delete an Undeletable File Using Windows Tools
Here are several solutions to delete a file that won’t delete:
1. Create a Different Access Name
- If the system automatically created an 8.3 format name, execute the following command in the command prompt: fsutil behavior set disable8dot3 and restart the computer.
2. Close the Program Using the File
- The error window displays which application is preventing deletion.
- If the utility is running in the background, close it via Task Manager using the key combination Ctrl+Shift+Esc (or Ctrl+Alt+Del in Windows 7 and XP, Windows+X in newer versions).
- Locate the utility in the list, right-click to open the command panel, and select “End Task.”
3. Change the Owner
- On the PC desktop, right-click and open “Properties.”
- Go to “Security” and “Advanced.”
- In the “Owner” section, select “Change” → “Advanced” → “Search.”
- A list of accounts will appear. Select yours, enter the login and password when prompted, and click OK.
4. Rename via Notepad
- Open the standard Notepad on any PC.
- Create a new document.
- In the task menu, select “File,” then “Save As…”.
- Choose the storage location in the folder with the problematic file.
- Select “All Files,” click on the file that won’t delete, and resave it with a new name. Then delete it.
5. Stop Explorer.exe
- If the error notification shows that the file is being used by explorer.exe, stop its operation via Task Manager.
- Launch the command prompt as an administrator and enter: del full_path_to_file.
- Once the problematic folder, document, photo, or video is deleted, reactivate explorer.exe. Open Task Manager → click on “File” → select “New Task” → enter the command explorer.exe.
How to Delete a Locked File Using a Bootable USB or LiveCD
If a file won’t delete, you can access the PC using a recovery disk or a LiveCD or a special Windows bootable USB.
Bootable USB with Windows OS Image
- To access the command prompt, press Shift+F10 or click on the “System Recovery” task in the OS boot program.
LiveCD Disk
- Delete the locked file using command line tools, Ubuntu terminal (Linux), or the canonical Windows graphical interface.
- Example for Linux: In the command line, enter: $ rm filename. To delete multiple files, enter all names in the command line, like: $ rm file1 file2 file3.
- When booting from LiveCD or after installing a new OS, hard drives often appear under different names. Verify you’re deleting from the correct disk by entering dir c: in the command line (it will display the list of files on the C drive).
Deleting Locked Files Using Unlocker Utility
This is a popular method for forced file deletion. Unlocker is an extremely simple-to-use application. It can delete locked utilities, folders, file contents, index.dat, terminate PC system processes, launch DLLs, rename objects, and more.
For One-Time Use
- Download the portable version of Unlocker.
- Launch the application.
- In the opened window, select the desired file.
- A list of blocking handles will appear. Click “Delete” at the bottom of the window.
For Installed Version
- Right-click on the problematic file area → select Unlocker from the task menu → follow the instructions above.
- If unsuccessful, restart the computer and press and hold F8 during system startup. The OS launch options will appear. Select “Safe Mode.” The lock will be removed, and you can delete the previously undeletable file. Then restart Windows in standard mode.