How to Use CMD Delete File/Folder [Windows 11 Applicable]

Updated by Dany on Nov 02, 2022
  | Computer Instruction

Windows Command Prompt Overview

What is Command Prompt? It is a command-line interpreter application also known as cmd.exe or cmd. It can only be used in Windows operating system, and it is a gorgeous tool that can help you do a lot of advanced operations and solve some Windows issues.

Command Prompt is functional, you can deal with USB virus remove with cmd or activate Windows using cmd, and you can use it to delete files and folders very fast with the del command and rmdir command, especially if you have several items to erase. We will teach you how to use cmd delete files with a detailed tutorial.

First, you can check a video to help understand how to use Command Prompt to delete files, and we have listed the essential moments:

  • 00:15 How to open Command Prompt
  • 00:27 Use the del command to delete files
  • 01:56 Use the del command to delete folders

How to Use CMD Delete File Step by Step

First, you need to know that using cmd to delete files is not like putting files and folders into Windows Recycle Bin. You can recover files from Recycle Bin folder directly, but it is not easy to recover cmd deleted files without third-party recovery software. So be careful when you are deleting files with cmd. Make sure you delete the files you don't want anymore. Now let us learn how to open cmd first.

How to Open Command Prompt on Windows 11/10

We will teach you the easiest way to open the Command Prompt on Windows.

Step 1. Click "Start", and you'll see the search box.

Step 2. Type in cmd

Step 3. Right-click cmd and select "Run as Administrator".

how to delete files with cmd

Step 4. Now you can use Command Prompt to delete files.

How to Use  CMD Delete File with del

Once you have learned how to open the Command Prompt, you can type in command lines. Follow the tutorial and type in the correct command lines to delete files.

Step 1. Type in del with a space after it.

Step 2. Then type the path for each file you want to delete, and remember to add spaces to separate each file name.

Step 3. Make sure you type in the right path and press the Enter key.

how to delete files with cmd

How to Use CMD Delete Folders with rmdir

You will need a different command to delete folders with cmd on your computer. Keep reading and follow the operations:

Step 1. Type in rmdir with a space after it.

Step 2. Then type the path for each folder you want to delete.

Step 3. Make sure you type in the right path and press the Enter key.

how to delete folders with cmd

Recover Deleted Files/Folders from CMD with the File Recovery Tool

It is possible that you accidentally delete key files and folders, and you don't know how to recover permanently deleted files. You can easily return these essential items with EaseUS Data Recovery Wizard.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.6

No matter it is you delete file with PowerShell or with Command Prompt, EaseUS Data Recovery Wizard can help you recover deleted files easily. This professional recovery tool also can be handy for home users.

You don't have to worry about how to recover deleted videos, photos, music, emails, and documents. EaseUS Data Recovery Wizard can ensure you don't bother with data loss anymore.

It is also a handy tool, and you can recover deleted files and folders in three steps.

Step 1. Select a location and start scanning

Launch EaseUS Data Recovery Wizard, hover on the partition/drive where the deleted files were stored. Click "Scan" to find lost files.

select a location where you deleted files

Step 2. Select the files you want to recover

When the scanning has finished, select the deleted files you want to recover. You can click on the filter to display only the file types you want. If you remember the file name, you can also search in the "Search files or folders" box, which is the fastest way to find the target file. 

Choose recoverable files

Step 3. Preview and recover deleted files

Preview the recoverable files. Then, select files you want to restore and click "Recover" to store the files at a new storage locations instead of the disk where the data was previously lost.

Recover deleted files

Summary

Except for deleting files with Command Prompt, there are many other things cmd can do on Windows. For example, if you can't find the file and find it is hidden. It is possible to show hidden files using cmd.

When you are using the computer or laptop, if you want to get back deleted videos, photos, or files, download EaseUS Data Recovery Wizard immediately, and you can find your lost files in one click.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.6

Command Prompt Delete File FAQs

We have listed some further questions and answers here:

What is delete command in cmd?

You will need the del command and rmdir command to delete files and folders with Command Prompt. And the del command is the most common command to erase one or multiple files.

How do I delete corrupted files in cmd?

When you find you can't commonly delete corrupted files, you can try deleting files with cmd.

  1. 1. Click "Start", and you'll see the search box.
  2. 2. Type in cmd.
  3. 3. Right-click cmd and select "Run as Administrator".
  4. 4. Type the following command Del /F /Q /A, and add the path of corrupted files.
  5. 4. Press the Enter key.

How do I delete multiple files in command prompt?

You can delete a single file and multiple files with the del command.

  1. 1. Type in del with a space after it.
  2. 2. Then type the path for each file you want to delete, and remember to add spaces to separate each file name.
  3. 3. Make sure you type in the right path and press the Enter key.

How delete all files and folders using cmd?

You can use cmd to delete all the files and folders using del and the /S flag ( to tell cmd to remove all files from all subdirectories).

Was This Page Helpful?

 
 
 

NEW Released

EaseUS
DriverHandy

Get It

EaseUS Data Recovery Services

Request a free evaluation >>

EaseUS data recovery experts have uneaqualed expertise to repair disks/systems and salvage data from all devices like RAID, HDD, SSD, USB, etc.