How to Delete a File or Folder Using Cmd (Command Prompt)

In this article, you will learn how to delete a file or folder using Cmd (Command prompt) in your PC or laptop. Deleting a file or folder in windows is very easy on any operating system. In Windows, you click on it and press delete button or right click on the folder and then click on delete to delete any folder or single file.

In this article, we discuss another method which is Command prompt method. We use Command prompt to delete a file or folder. Mostly all of us used the traditional method to delete file or folder from the operating system therefore, we think the use of Command prompt is difficult. Actually command prompt is very easy which you realize after reading and implement this method on your operating system.

Remember: when you delete any file or folder using command prompt the file is not going to the recycle bin. Which means your file is permanently deleted and you cannot recover it very easily so make sure you delete the useless file which you want to delete.

Delete File or Folder Using Cmd (Command Prompt)

You need to open the Command prompt as administrator. To open this, type Cmd in the search bar and then right-click on command prompt and click on run as an administrator.

delete file using cmd (command prompt)

You need to know the path of a folder which you want to delete. To get the path of the specific file or folder press shift key on the keyboard and then right-click on the folder and click on copy as path.

Now paste the file path in command prompt after Del command.

Del “C:\Users\shahjee\Desktop\file.txt”

In windows 10 you can right-click on command prompt the path address paste automatically or Ctrl + V but in Windows 7 and 8, you cannot allow to this.

In Windows 7 and 8 right-click on the tap bar and click on edit and then click on paste.

delete a file using command prompt

After pasting the path address click or hit on enter. Now you have successfully deleted your file using Command prompt.

Now you want to force to delete a file, for doing this

Type Del/F pathofthefile

Ex:Del/F”C:\Users\shahjee\Desktop\file.txt”

I hope you like this post. For support please comment on this post and then share this post in your social circle.

You may also like to read…

Leave a Reply

Your email address will not be published. Required fields are marked *