In this article, we will explain how to delete a file or a folder with the help of CMD.

Follow the following steps to delete a file or folder using CMB.

  1. First of all, you need to create a file and folder.
  2. Here are the commands used to delete a specific file or a folder and directly place them into the recycle bin-
  3. del rmdir
  4. Use the “del” command

    Here, we will try o delete our created file “Extra.docx” using CMD.

    You need to change the path of the directory in the command line and set the path of the file you want to delete.

    Enter the below command and press the enter key:

    cd Desktop

    Now, enter the name of the file you want to delete in the second line as given below:

    del Extra.docx


    You will see the file has been deleted.
  5. Use the “rmdir” command.

Here, we will try to delete the folder that we have created “Example.” Using CMD

If you want to change the path of the directory in the command line and set the path of the folder you want to delete.

Enter the below command and press the enter key:
Cd desktop

Enter the name of the folder in the next line:
rmdir Example

        You will see the folder has deleted.

        In this way, you can delete a file and folder using CMD.

        Popular Posts You May Read

        Explore more hosting insights, tips and industry updates.

        How Do You Turn On Hotlink Protection

        In this article, we will explain to you What Is Hotlink Protection and the process…

        Intel Xeon E5-2600 Expands its v4 with 22 Core

        With 22 Core, 14 nm engraving, security, and telemetry functions strengthened, Intel Xeon E5-2600 v4…

        Protecting Data On Your SSD Using SafeGuard Device Encryption

        At this point in the game, you should understand the importance of encryption for keeping…