This guide walks you through the most effective ways to remove folders that Windows refuses to delete, whether the error is “File in Use,” “Access Denied,” or “You need permission to perform this action.” You’ll learn the safest fixes first, then move to more forceful methods, so you can clear out stubborn folders without damaging your system.
What You’ll Need
- A Windows administrator account (most fixes require it)
- Patience—some methods take a few minutes
- For the Command Prompt method: the exact path to the folder (e.g.,
C:\Users\YourName\Desktop\StuckFolder)
Step-by-Step
- Close any programs that might be using the folder. Check for open files inside it, close media players, text editors, or file explorers that have it open. If you’re unsure, restart your PC and try deleting the folder immediately after boot—before opening any other programs.
- Try the simple delete again. Right-click the folder and select Delete, or select it and press Shift + Delete (permanent delete, skips Recycle Bin). If it works, you’re done. If you get an error, note the exact message—it tells you which fix to use next.
- Take ownership of the folder (for “Access Denied” errors). Right-click the folder → Properties → Security tab → Advanced → next to “Owner,” click Change. Type your username, click Check Names, then OK. Tick “Replace owner on subcontainers and objects” and click OK. Go back to the Security tab, click Edit, select your user, tick “Full control,” then OK. Try deleting again.
- Use Command Prompt to force delete. Press Win + R, type
cmd, and press Ctrl + Shift + Enter to run as administrator. Then type:
rmdir /s /q "C:\full\path\to\folder"
Replace the path with your folder’s actual location. The/sremoves all subfolders,/qskips confirmation prompts. If it says “Access is denied,” try the next step. - Delete via Safe Mode. Restart your PC and press F8 (or Shift + Restart → Troubleshoot → Advanced Options → Startup Settings → Restart → press 4) to boot into Safe Mode. In Safe Mode, Windows loads only essential drivers, so most programs won’t be locking the folder. Try deleting it there.
- Use a live Linux USB (last resort). Create a bootable USB with Ubuntu or another Linux distro. Boot from it, choose “Try Ubuntu,” open the file manager, navigate to your Windows drive, and delete the folder. This bypasses all Windows file locks entirely.
- Check for malware. If a folder reappears after deletion, or you can’t delete it even in Safe Mode, run a full system scan with Windows Defender or a reputable antivirus. Some malware creates undeletable folders to hide files.
Common Mistakes
- Skipping the restart. Many “file in use” errors are caused by background processes. A fresh boot clears most of them.
- Typing the wrong path in Command Prompt. One wrong character means the command fails. Copy the path from the address bar in File Explorer instead of typing it.
- Using third-party “unlocker” tools. Many are outdated, bundled with adware, or don’t work on modern Windows versions. Stick to built-in methods.
- Deleting system folders. If the folder is in
C:\WindowsorProgram Files, it’s likely needed. Deleting it can break Windows. - Not checking Recycle Bin. If you used regular Delete, the folder might be sitting in the Recycle Bin. Empty it there.
Tips
- Try the simplest fix first. Restarting your PC resolves a surprising number of “undeletable” folders.
- Use the Shift + Delete shortcut to skip the Recycle Bin entirely—saves a step.
- If you’re unsure what’s locking the folder, open Task Manager (Ctrl + Shift + Esc) and look for any suspicious processes. Sort by name and check if any match the folder’s contents.
- For folders with long paths (over 260 characters), enable long path support:
Win + R→gpedit.msc→ Computer Configuration → Administrative Templates → System → Filesystem → enable “Enable Win32 long paths.” Then restart. - Keep a backup. Before force-deleting, make sure you don’t need any files inside. Once gone, they’re gone for good.
Troubleshooting
“The action can’t be completed because the folder is open in another program”
Even after restarting, this can happen. Open Task Manager, go to the “Details” tab, and look for any process with a high memory or disk usage. Right-click and “End task” for anything you don’t recognize. Then try deleting again.
“You need permission to perform this action”
You took ownership but still get this? Make sure you clicked Advanced → Change and typed your username correctly. Also, after taking ownership, you must close and reopen the Properties window for the permission changes to apply.
Command Prompt says “Access is denied”
This means the folder is locked by a system process. Try the Safe Mode method. If that fails, check if the folder is a junction point or symbolic link (right-click → Properties → check if it says “Reparse point”). If so, delete the link, not the target folder.
The folder reappears after deletion
This is a classic sign of malware. Run a full system scan. If you’re in a corporate environment, it could also be a group policy that recreates the folder—contact your IT admin.
Nothing works, even in Linux
If a Linux live USB can’t delete it, the folder might be on a corrupted filesystem. Run chkdsk C: /f from an administrator Command Prompt, then restart and try again. If the drive has bad sectors, consider backing up and replacing it.
Frequently Asked Questions
Q: Is it safe to delete a folder using Command Prompt?
A: Yes, as long as you type the path correctly and you’re sure the folder isn’t needed. The /s flag deletes everything inside, so double-check the path.
Q: Why does Windows say “File in Use” when nothing is open?
A: Background processes, antivirus scans, or Windows Search indexing can lock files temporarily. A restart usually clears these locks.
Q: Can I delete a folder that’s in use by a system service?
A: Sometimes. Stop the service first (Win + R → services.msc → find the service → right-click → Stop), then delete. If it’s a core Windows service, don’t—it may break your system.
Q: What’s the difference between “Delete” and “Shift + Delete”?
A: Regular Delete moves the folder to the Recycle Bin. Shift + Delete permanently removes it without the Recycle Bin step.
Q: Will taking ownership of a folder damage my system?
A: No, it just changes which user has control. It’s safe as long as you only do it to folders you need to delete, not system folders like C:\Windows.
Q: Why does my folder have a weird name or icon?
A: It could be corrupted, or it might be a system folder that Windows hides by default. Enable “Show hidden files” in File Explorer (View → Show → Hidden items) to see if it’s hidden.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Recover Photos from a Water Damaged iPhone 6s
- Computer on a Stick: Plain English Definition9.26 yd³
- How to Backup Android Contacts to PC
- How to Log Out of Discord on Desktop & Mobile
- How to Install an M.2 SSD: Step-by-Step Guide
- Fix HP Accelerometer Not Working on Windows