How to Delete Locked Folder in Windows?
Delete locked folder errors come from open apps and missing permissions. You get 5 methods in this guide. Method 1 closes the apps that hold the folder. Method 2 deletes the folder in Safe Mode. Method 3 uses Command Prompt commands. Method 4 changes the folder permissions. Method 5 wipes the folder with PCVITA software. Skip system folders in every method.
Windows refuses to delete locked folder data and shows a message about a file in use or a missing permission. You stay stuck with a folder that wastes space and clutters your drive.
This guide shows how to delete locked folder data in Windows with 5 methods. Microsoft documents the commands in Method 3 on its pages for takeown and rmdir.
Why Does a Folder Get Locked?
Windows locks a folder when something still uses it or when your account lacks the rights to change it. You cannot delete locked folder content until you remove that cause.
- Open process. An app or a background service holds a file inside the folder.
- Missing permission. Your account does not own the folder or lacks Full Control.
- Protection. The folder is marked hidden or system to block accidental removal.
- Scan in progress. Your antivirus checks the folder at that moment.
- File system errors. Damage on the disk blocks the delete.
Microsoft states that the rmdir command with the /s switch deletes a directory tree with all its files. The /q switch skips the confirmation prompt. Check the path before you press Enter.
What to Check Before You Delete Anything
A deleted folder can hold files you still need. Check these points first.
- Open the folder and confirm that it holds nothing you need.
- Copy any file you want to keep to another disk.
- Sign in with an administrator account.
- Stay out of folders like
WindowsandProgram Files.
Method #1: Close the Apps That Hold the Folder (Free)
Start with the simplest way to delete locked folder data. An open app holds a file in your folder and Windows blocks the delete.
- Close every app that uses files from the folder.
- Press Ctrl + Shift + Esc to open Task Manager.
- Find the process that uses the folder. Right click it and select End task.
- Delete the folder again in File Explorer.
Restart your PC if you cannot find the process. Delete the folder right after the start before other apps load.
Method #2: Delete the Folder in Safe Mode (Free)
Safe Mode helps you delete locked folder data because Windows loads a limited set of files and drivers. Fewer apps start so fewer files stay locked. Microsoft explains the steps on its page about starting your PC in Safe Mode.
- Select Troubleshoot, Advanced options, Startup Settings and Restart in the recovery menu.
- Press 4 or F4 to start Safe Mode.
- Delete the folder in File Explorer.
- Restart your PC to return to normal mode.
Open msconfig and clear Safe boot on the Boot tab if Windows keeps starting in Safe Mode.
Never delete system files in Safe Mode. Windows can fail to start afterward.
Method #3: Delete Locked Folder With Command Prompt (Free)
Command Prompt lets you delete locked folder data after it takes ownership in one session. Microsoft states that takeown makes an administrator the owner of a file that was denied before. The icacls command then grants you full access.
- Type
cmdin the Windows search box. Right click Command Prompt and select Run as administrator. - Take ownership of the folder.
takeown /f "C:\Path\Folder" /r /d y - Grant full access to administrators.
icacls "C:\Path\Folder" /grant administrators:F /t - Delete the folder with all its content.
rd /s /q "C:\Path\Folder"
Replace C:\Path\Folder with the real path of your folder. Microsoft states that the /q switch deletes the directory tree without a confirmation prompt.
Method #4: Change the Folder Permissions (Free)
Windows blocks the delete when your account lacks Full Control. You fix that in the folder properties and delete locked folder data with no commands.
- Right click the folder and select Properties.
- Open the Security tab and click Advanced.
- Click Change next to the owner and enter your user name. Click OK.
- Click Add and select your user name as principal. Allow Full control and click OK.
- Delete the folder again.
Method #5: Wipe the Locked Folder With File Shredder (Fast, Paid)
Use this method to delete locked folder data when the free methods fail or when you want the folder gone for good. PCVITA File Shredder wipes files and folders so nobody can recover them. Its Force Wipe option targets locked and permission restricted data that a normal delete leaves behind.
- Nine wipe methods. Choices range from 1 pass to 35 passes with US DoD and Peter Gutmann among them.
- Folder and drive targets. The File/Folder, Disk, Partition and Pen Drive tabs cover every storage type.
- Reports. Save Report stores the status and the wipe method. View Logs tracks every wipe.
- Wide storage support. HDD, SSD, NVMe, USB drives and memory cards work.
- Install PCVITA File Shredder and start it as administrator.
- Open the File/Folder tab and add your locked folder.
- Click Next to scan the folder.
- Select a wipe method and tick the Force Wipe option.
- Click Wipe and confirm the warning.
- Save the report when the wipe finishes.
Test the free demo on a small folder first. The demo covers 10 files under 5 MB.
Which Method Fits Your Case?
| Method | Works When | Risk to Data | Cost |
|---|---|---|---|
| #1 Close Apps | An app holds the folder | Unsaved work in the app | Free |
| #2 Safe Mode | Startup apps lock the folder | System files if you delete them | Free |
| #3 Command Prompt | Ownership blocks the delete | No prompt before removal | Free |
| #4 Permissions | Your account lacks Full Control | Low | Free |
| #5 File Shredder | Free methods fail or you need a wipe | Data is gone for good | Free demo, $29 full |
Safe Handling Tips
- Copy first. Save the files you want to keep before you remove the folder.
- Check the path. One wrong letter in a command removes the wrong folder.
FAQs About Locked Folders
Why does Windows say a folder is in use?
Windows blocks a delete when a process holds a file inside the folder. Close the app or end its process in Task Manager and try again.
How do I delete a locked folder without a restart?
End the process that holds the folder in Task Manager and delete the folder again. Use Command Prompt or the folder permissions if the folder stays locked.
Is it safe to delete a locked folder in Safe Mode?
Yes for folders of your own apps and files. Microsoft states that Safe Mode starts Windows with a limited set of files and drivers. Leave system folders alone.
Can I recover a folder after I delete it?
A normal delete leaves the data on the disk until new data replaces it. A wipe overwrites the data so recovery is not possible. Check the folder twice before you wipe it.
What does PCVITA File Shredder do to a locked folder?
PCVITA File Shredder overwrites the folder data so nobody can recover it. The Force Wipe option targets locked and permission restricted data that a normal delete leaves behind.
Which Windows versions does PCVITA File Shredder support?
PCVITA File Shredder works on Windows 11 64 bit and Windows 10 32 bit and 64 bit. It needs Microsoft .NET Framework 4.5 or later.
Does the free demo of PCVITA File Shredder wipe all my files?
No. The free demo covers 10 files under 5 MB in size. The full Windows edition costs $29 for one licence.
Closing Words
You delete locked folder data once you remove the lock or the permission block. Start with Task Manager and move to Safe Mode and commands next.
- Methods 1 to 4 delete locked folder content for free with Windows alone.
- Method 5 wipes the folder for good when the free methods fail.