EaseUS Partition Master

How to Force Delete Files and Folders Using CMD in Windows

When you encounter files that can't be deleted, you can check this tutorial to learn how to force delete files or folders using Windows Command Prompt.

Free Download 

Windows 11/10/8/7100% Secure

Content

Page Table of Contents

Updated by

Roxanne

Updated on Mar 26, 2025

Sometimes, you may fail to delete files or folders on your Windows computer. In such cases, using the Command Prompt (CMD) can be an effective way to force delete files and folders that can't be deleted. Additionally, third-party tools like EaseUS Partition Master offer alternative solutions for managing undeletable files. This EaseUS article will provide a step-by-step tutorial on using CMD and other solutions to force delete files and folders.

How to Force Delete Files Using CMD

The Command Prompt is a powerful tool in Windows that allows you to execute commands to perform various tasks, including deleting files and folders. Before processing, you should make sure your file or folder is ready:

  • Check no program or application is using the file/folder you want to delete.
  • Check if this file is corrupted.
  • Ensure this file is not on read-only status.

Now, let's go through the detailed steps:

Step 1. Press "Windows + R" to open the Run dialog. Type cmd and press Enter to run Command Prompt as an administrator.

convert-basic-to-dynamic-via-cmd-1.jpg

Step 2. Right-click the file you want to delete and select "Properties" to find its path. (Or, you can right-click the file and select "Copy as path" to copy the file path directly. )

Step 3. In the Command Prompt, type del followed by the file path. Then, press "Enter" to execute this command.

(for example del c:\users\JohnDoe\Desktop\text.txt).

Alternative Way: Using EaseUS Partition Master

EaseUS Partition Master Professional is a versatile tool that offers a file shredder feature, allowing you to permanently delete files and folders. This method is particularly useful for ensuring that deleted files cannot be recovered.

Free Download 

Windows 11/10/8/7100% Secure

Step 1. Launch EaseUS File Shreder

Run EaseUS Partition Master, go to the Disovery section, and click "File Shredder" to run this file shreding tool.

Open File Shredder

Step 2. Select Files or Folders to Shred

Drag files or folders to the center area or click "Add Folder", "Add Files" to select target files or folder to shred.

Select files or folder to shred

Step 3. Confirm to Shred

Confirm the selected files or folders, and click "Shred" to execute the operation to permanently shred data from your device.

Confirm to shred files and folders

If you want to learn other available solutions, this guide is what you looking for:

related articles

How to Force Delete A File on Windows 11/10/8/7

Your file/folder cannot be deleted? Don't worry. This post contains multiple solutions, including Command Prompt, Windows Delete short keys, Task Manager, and third-party file deleting tools.

how-to-force-delete-a-file.png

Why Files Can't Be Deleted?

What are the common reasons files can't be deleted in Windows? Files in Windows often cannot be deleted due to several common reasons. Here are the typical reasons:

✔️The File Is in Use: A file might be open in a background process or application, even if it's not visible on the screen. This prevents Windows from deleting the file until the process is closed.

✔️System File Restrictions: Windows protects certain system files from deletion to maintain system stability. Attempting to delete these files will result in an error.

✔️Permissions Issues: You might not have the necessary permissions to delete a file, especially if you're not logged in as an administrator or if the file's ACL (Access Control List) restricts access.

✔️File/Folder Corruption: If a file or folder is corrupted, standard deletion methods may fail. Special steps are required to remove corrupted files.

✔️Write-protection or Read-only Status: Files or folders may be set to read-only, either manually or due to disk errors, preventing any modifications, including deletion.

Now, you can share the above solutions and potential reasons with more users:

Conclusion

Force deleting files and folders in Windows can be achieved through various methods, including using the Command Prompt, EaseUS Partition Master, and other Windows solutions. Each method has its advantages and should be chosen based on the specific situation. For instance, CMD is ideal for direct deletion, while EaseUS Partition Master ensures permanent deletion. Always be cautious when deleting files to avoid data loss or system issues.

Free Download 

Windows 11/10/8/7100% Secure

FAQs: How to Force Delete Files Using CMD in Windows

1. How do I check if my file is corrupted?

To check file corruption: Verify file extension compatibility, try opening with different software, check if the size is 0 bytes, use hash/signature validation, or attempt file read with error handling. System tools like chkdsk can detect disk-related corruption.

2. Can I delete undeletable files in CMD?

Yes, you can delete undeletable files using the Command Prompt (CMD) in Windows. Check part 1 of this article.

3. How do you force delete a file that says access denied?

To resolve this problem, choose one of these options:

#1. In Windows Explorer, select the files/folders you want to remove and press Shift + Delete. This method prevents the items from being stored in the Recycle Bin and deletes them immediately.

#2. Launch the Command Prompt and type the command: rd/s/q"full path of the target file or folder"

How Can We Help You

About the Author

Updated by Roxanne

Roxanne is one of the main contributors to EaseUS and has created over 200 posts that help users solve multiple issues and failures on digital devices like PCs, Mobile phones, tablets, and Macs. She loves to share ideas with people of the same interests.

Read full bio

Product Reviews

Product Reviews

TrustScore 4.7 | 49 reviews
  • I love that the changes you make with EaseUS Partition Master Free aren't immediately applied to the disks. It makes it way easier to play out what will happen after you've made all the changes. I also think the overall look and feel of EaseUS Partition Master Free makes whatever you're doing with your computer's partitions easy.

    Read More
  • Partition Master Free can Resize, Move, Merge, Migrate, and Copy disks or partitions; convert to local, change label, defragment, check and explore partition; and much more. A premium upgrade adds free tech support and the ability to resize dynamic volumes.

    Read More
  • It won't hot image your drives or align them, but since it's coupled with a partition manager, it allows you do perform many tasks at once, instead of just cloning drives. You can move partitions around, resize them, defragment, and more, along with the other tools you'd expect from a cloning tool.

    Read More

EaseUS Partition Master

Manage partitions and optimize disks efficiently

Free Download 

Windows 11/10/8/7100% Secure

Get EaseUS Partition Master

Your best companion for disk partitioning, MBR to GPT/GPT to MBR conversion,even OS migration

Free Download 

Windows 11/10/8/7100% Secure