TechBuzzPro

How to Delete a Folder in Windows 10 When Access Is Denied

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

If Windows 10 says “You don’t have permission to delete this folder” or “Access is denied,” the fastest fix is usually to take ownership of the folder and grant yourself Full Control, then delete it. You can do this through the folder’s Properties > Security tab, or by running a short command in an elevated Command Prompt. Below are the exact steps for both methods, plus the common reasons the error appears and what to try if the folder still will not budge.

What You'll Need

  • An administrator account on the PC (or the ability to enter an admin password when prompted).
  • The exact path to the folder — you can copy it from the address bar in File Explorer.
  • Patience: some system-protected folders require an extra step or a restart before they can be removed.

Step-by-Step

Method 1: Take ownership through Properties (recommended)

  1. Open File Explorer and navigate to the folder you want to delete. If you cannot even open it, go to its parent folder instead.
  2. Right-click the folder and choose Properties.
  3. Go to the Security tab and click Advanced. (Menu labels can differ slightly by Windows 10 version and region.)
  4. At the top, next to Owner, click Change.
  5. In the box that says “Enter the object name to select,” type your Windows username (or Administrators if you are on an admin account) and click Check Names. The name should underline; click OK.
  6. If you want this to apply to subfolders and files too, tick Replace owner on subcontainers and objects, then click Apply and OK.
  7. Back on the Security tab, click Edit to change permissions. Select your username (or Administrators) and tick Full control under Allow. Click Apply and OK.
  8. Close Properties and try deleting the folder again — right-click it and choose Delete, or press Shift+Delete to skip the Recycle Bin.

Method 2: Use an elevated Command Prompt

  1. Click Start, type cmd, right-click Command Prompt and choose Run as administrator.
  2. Type takeown /f "C:\full\path\to\folder" /r /d y and press Enter. Replace the path with your actual folder path, keeping the quotes. This makes you the owner and applies it recursively.
  3. Type icacls "C:\full\path\to\folder" /grant administrators:F /t and press Enter. This grants the Administrators group Full Control over the folder and everything inside it.
  4. Delete the folder with rmdir /s /q "C:\full\path\to\folder" and press Enter. The /s removes all files and subfolders, and /q runs quietly without confirmation prompts.

If the folder is in use by a running program, close that program first. If you are not sure which program is using it, restart the PC and try again before running the commands.

Common Mistakes

  • Skipping “Replace owner on subcontainers and objects.” Without it, files inside the folder keep their old owner and the delete still fails.
  • Granting permissions to the wrong account. If you are not sure which account you are signed in with, check the Start menu or run whoami in Command Prompt.
  • Typing the folder path without quotes. Paths with spaces will break the command. Always wrap the path in double quotes.
  • Deleting a folder that a program or Windows itself is using. This causes “access is denied” even after you take ownership. Close the program or restart first.
  • Using a standard (non-admin) account. You need administrator rights to change ownership on protected folders.

Tips

  • Copy the folder path from File Explorer’s address bar (click the empty space at the right of the path and press Ctrl+C) to avoid typos in Command Prompt.
  • If you only need to free up space, move the folder to another drive first, then delete it — some antivirus tools block deletion but allow moving.
  • For folders created by an old user account, taking ownership as Administrators is often more reliable than using your own username.
  • Run Command Prompt as administrator every time; a normal window will fail with “access is denied” on the same commands.
  • If the folder is on an external drive, check that the drive is not write-protected and that it is formatted with a file system Windows can modify (NTFS or exFAT).

Troubleshooting

If the folder still will not delete after taking ownership, work through these checks in order:

  1. Restart the PC. A restart releases file locks held by background processes and is the simplest fix for “access is denied” on folders that were just in use.
  2. Boot into Safe Mode. Hold Shift while clicking Restart from the Start menu, then choose Troubleshoot > Advanced options > Startup Settings > Restart and select Safe Mode. Try deleting the folder there; if it works, a third-party program was locking it.
  3. Check for read-only attributes. Right-click the folder > Properties and clear the Read-only box if it is filled. Apply to subfolders if prompted.
  4. Use Disk Cleanup or Storage Sense if the folder is a temporary or system cache folder. These tools remove files Windows is actively using without fighting permissions.
  5. Scan for malware. Some malicious files lock themselves in place. Run a full scan with Windows Security (Start > Settings > Update & Security > Windows Security > Virus & threat protection).
  6. Check the folder is not a junction or symbolic link. Deleting the link is fine, but deleting the target can remove data you did not intend to. If unsure, leave it alone.

If the folder belongs to Windows itself (for example inside C:\Windows or Program Files), do not force-delete it. Removing system folders can break Windows or an installed program. Use the program’s own uninstaller instead.

Frequently Asked Questions

Why does Windows say access is denied when I am the administrator?

Being an administrator does not automatically give you ownership of every folder. Windows protects certain folders with a separate owner and permission list, so you have to take ownership explicitly before you can delete them.

Can I delete a folder without taking ownership?

Only if your account already has Full Control or the folder is in a location you own, such as your own Documents or Desktop. For folders created by another user or by Windows, taking ownership is the reliable route.

Is it safe to use takeown and icacls?

Yes, when used on a folder you created or no longer need. Do not run them on Windows system folders or program installation folders, because changing permissions there can stop Windows or an app from working.

What if the folder is open in another program?

Close the program, or restart the PC. You can also use Task Manager to end the process that is using the folder, but be careful not to end Windows processes.

Does deleting a folder with Shift+Delete send it to the Recycle Bin?

No. Shift+Delete permanently removes the folder and its contents. Use plain Delete if you want the option to restore it later.

Why can I not delete a folder on an external drive?

The drive may be write-protected, formatted with a file system Windows cannot modify, or locked by another device. Check the drive’s properties and try again after safely ejecting and reconnecting it.