Deleting files or folders is something we do quite often in Windows 10. The regular way to delete a file involves right-clicking on the item and selecting the “Delete” option from the context menu, or pressing the Delete key on your keyboard after selecting the file.

You can also use the Shift + Delete shortcut to permanently remove files or folders. However, some files or folders are very stubborn and will not delete no matter what you do, showing an error message like "Cannot delete [filename]: Access is denied."

There can be many reasons why a file or folder cannot be deleted, such as the file or folder is in use by a program that needs to be closed before you can delete it, the folder is read-only, the disk that contains the file is write-protected, the Recycle Bin is full, and so on. Whatever the reason, if you are sure that the file or folder is unnecessary, you can try any of the four methods below to force delete a file or folder in Windows 11/10/8/7.

Please provide the text you want to translate, and I will translate it into English as soon as possible.

Solutions That Work Step-by-Step Troubleshooting
Solution 1. Force Remove Folder via CMD If you can't delete folders or files normally, use the DEL command in CMD...Full Steps
Solution 2. Force Remove Folder with Software Using a folder force removal tool to delete stubborn files is practical and simple...Full Steps
Solution 3. Delete File via Ownership You need ownership of a file or folder to delete it on Windows. Obtain or change ownership...Full Steps
Solution 4. Force Remove Folder in Safe Mode In Safe Mode, problematic apps or features won't start, allowing you to delete the folder...Full Steps

1. Forcefully delete a folder in Windows 10 using the Del command in CMD with utf-8 encoding.

The Command Prompt in Windows can be used to perform advanced operations, including forcibly deleting files or folders, even if a program is using them. If you're comfortable with computers, the Command Prompt can be a great tool for managing your disks and files.

Here's how to forcibly delete a folder in Windows 10:

Step 1: Press Win + E to open File Explorer. Locate the file or folder you want to delete. Copy the path of the file or folder.

Copy file location

Step 2: Click the Search button, type cmd, and then click "Run as administrator" in the right panel to open it with administrative privileges.

Run cmd as administrator

Step 3: Type the following command and press Enter.

Delete (FilePath) This line of code signifies the deletion of a file or folder at the specified file path (FilePath). The syntax may vary across different programming languages, but the essence remains the same – it removes the entity at the designated path from the file system.

For example, D:\Pictures. Replace FilePath with the address of the file or folder that you copied in step 1.

Use del in cmd to force delete a file

Step 4. Type in `Y` for "Do you really want to remove them? (Y/N)" and press Enter. The folder will be deleted quickly.

Caution
The DEL command bypasses the Windows Recycle Bin and permanently deletes files or folders. They cannot be restored unless you use a professional file recovery utility.

How to recover permanently deleted files or folders on Windows 10/11?

You might lose your files permanently due to accidental deletion/formating, hard drive failure, virus attack, or OS crash. In any case, you can use tools Data Recovery software to safely and efficiently retrieve lost or deleted files.

tools Data Recovery Wizard is a top-tier data recovery tool that lets you easily retrieve lost and deleted files from various devices, including HDD, SSD, SD cards, USB flash drives, and thumb drives.

In addition, it excels at repairing corrupted files after data recovery. You can easily repair corrupted videos (MOV/MP4/GIF), photos (JPEG/JPG/BMP/PNG), and documents (DOC/DOCX/XLS/XLSX).

Now, download this reliable file recovery software for free to restore over 1000 types of files like videos, audios, documents, graphics, emails, and other files.

Step 1: Select the location to scan

Select the specific device or drive from where you had Shift+Deleted or permanently erased files. Click on the “Scan” button to retrieve lost files.

Select a location and click Scan

Second step: Check the results

The software will automatically start scanning all contents on the selected drive. Once the scan is complete, select the "Deleted Files" and "Other Lost Files" folders in the left panel. Then, use the "Filter" feature or click the "Search for File or Folder" button to quickly locate the deleted file.

Scan for Permanently Deleted Files

Step 3: Recover the deleted files

Select the deleted files you want to recover, then click “Preview.” When you're ready, click “Recover” to save them to another secure location or device.

Select the files and click on “Recover”. Select the files and click on Recover

Delete Files or Folders Permanently with a File Shredder Tool

Another effective way to delete undeletable files or folders is by using a simple file shredder. LockMyFile by Tools is a user-friendly file management tool that can help you completely erase and shred files or folders from your computer with its file shredding feature.

Step 1: Download and run the tool LockMyFile.

2. Click on "File Shredder" under "More Tools." Then, click "Add File," "Add Folder," or "Add Drive" to select the file, folder, or drive you wish to shred.

Step 3: Select the files, folders, or drives you want to destroy, then click “Wipe Now” or “Erase Disk” to delete your selection for good.

Forced File Deletion Software

These features are used for deleting unwanted files or folders. The software is most famous for its file/folder protection which includes file encryption, file locking, and file hiding, among others. Try this tool if you need maximum protection for your important data.

Force delete a folder in Windows 10 by changing file ownership

To delete a folder or file, you need to own the folder/file in question. If you're trying to delete a folder created by another user, follow the steps below to learn how to take ownership of a folder on Windows 11/10/8.

**Step 1.** Open File Explorer on your Windows computer and locate the file or folder you want to delete. Right-click it, then choose "Properties."

Take Ownership of a File or Folder

Step 2: Click Security > Advanced, as shown in the following image.

Fix 'You need permission to copy files or folders' error

Step 3: To change an existing user or group, click Change, select the target user account, and click OK to save your changes.

Change user

To change ownership to a user or group that does not exist: Click Change > Object Types..., type the name of the user or group in Type the object names to select, and then click Check Names > OK.

Change the owner to take ownership of the target file or folder

To change the owner of all child containers and objects, select the Replace owner on child containers and objects check box.

Change the subfolder to resolve the 'Access is denied' issue.

Then, try deleting the file or folder again.

Take ownership to force-delete a folder in Windows 7:

Step 1: Right-click the folder or file you want to hide, and select “Properties.”

Step 2: Click on "Security" >> "Advanced".

Take Ownership in Windows 7

Step 3: Click on "Owner" and then "Edit" to change the owner.

Edit Ownership in Windows 7

Step 4. Click “Other users or groups” to choose the user manually.

Select another user group

Step 5: Follow the on-screen instructions to change the ownership, just as you did in Step 3 above for Windows 10.

4. Force delete a file or folder in Safe Mode

If all else fails, you can still force-delete a folder in Windows 10 or Windows 11 by booting into Safe Mode. In Safe Mode, most apps won't launch, giving you a very clean environment to delete the file/folder.

Step 1. Click the “Start” button, select “Power,” and while holding down the “Shift” key, click “Restart.”

How to Boot into Safe Mode - 2

Step 2: Click on "Troubleshoot" and then "Advanced options."

How to Boot into Safe Mode - 3

Step 3. On the next screen, click on “Startup Settings.” Then, click on “Restart.”

How to Start in Safe Mode - Click Restart

Step 4: From the Startup Settings screen, choose one of the options to boot into Safe Mode, as shown in items 4, 5, and 6 in the image below. Choose Windows 10 Safe Mode as per your requirement

Then, your Windows computer will start in Safe Mode, and you can try deleting the file or folder again.

Conclusion and FAQ

We've outlined four effective methods to help you force-delete files or folders in Windows 10 or Windows 11. You can also try quick tricks like checking your antivirus software (which might be blocking the deletion), restarting your system, or uninstalling certain third-party apps.

Before performing a forced delete, make sure the data you're erasing is from the intended folder or file. If an error occurs, immediately cease using your computer or external device and utilize data recovery software like Recuva to restore your information.

More information about "Force delete folder" issues

**1. How do I force delete a folder that another program has open in Windows 10?** When you try to delete a folder and find it's being used by another program, you can attempt the following methods to force the deletion: 1. **End the Process**: Press `Ctrl + Shift + Esc` to open Task Manager, locate the process using the folder, click on it, and then choose "End Task." 2. **Command Prompt**: Press `Win + X`, and select "Command Prompt" (or "Command Prompt (Admin)"). Type the following command and press Enter: ``` rd /s /q "Path\To\Folder" ``` Replace "Path\To\Folder" with the actual path of the folder you want to delete. 3. **Using File Explorer**: Try right-clicking on the folder, selecting "Eject," and then attempting to delete it again. 4. **Restart Your Computer**: If all else fails, restart your computer, and immediately delete the folder after the reboot. Please note that force deleting might result in data loss, so make sure to back up important files before proceeding.

To fix the "File in Use" error when deleting a folder, you can:

    • Close programs through the Task Manager
    • Restart your computer
    • Force delete a folder using CMD
    • Force delete a folder using third-party software

2. Software for Forced Folder Deletion

Try using either of these two file deletion utilities on Windows 10/8/7 to forcefully remove folders:

  • LockMyFile: Its file shredder feature allows you to completely delete files, folders, and even wipe entire disks.
  • tools Partition Master Free: Its data erasing feature lets you permanently clean up partition data.

**How to Force Delete a Folder in Windows 10 PowerShell** To forcefully delete a folder in Windows 10 using PowerShell, follow these steps: 1. **Run PowerShell as an administrator:** - Press `Win + X` and then choose `Windows PowerShell (Admin)` or `PowerShell (Admin)`, depending on your system settings. 2. **Navigate to the target folder:** - In the PowerShell window, type the `cd` or `Change-Directory` command followed by the path of the folder you want to delete. For example, if you want to delete `C:\Users\YourUsername\Documents\MyFolder`, enter: ``` cd C:\Users\YourUsername\Documents ``` 3. **Use the deletion command:** - Type the following command to delete the folder, replacing `YourFolderName` with the actual folder name: ``` Remove-Item -Path .\YourFolderName -Recurse -Force ``` The `-Recurse` parameter is used to delete the folder along with all its subfolders and files. The `-Force` parameter forces the deletion without prompting for confirmation. 4. **Execute the command:** - Press `Enter` to execute the command. The folder will be immediately deleted without any prompts. Please note that this action is irreversible, so make sure you really want to delete the folder and its contents.

Step 1: Search for PowerShell and run it as an administrator.

Step 2. In the Command Prompt window, type remove-item D:\Pictures and press Enter.

Tip: Replace "D:\Pictures" with the location of the file or folder you want to delete.