Did you know that there was another time when to delete a file from your PC you had to run complicated commands in MS-DOS in what we now call a command prompt (or CMD)? Yes, before, not everything was “color of roses” and to run a game or a program on the PC you had to know a good list of commands to execute them step by step. That is why Windows was born as an operating system with a friendlier interface to make the home computer reach the maximum number of users possible. That being said, you may be curious about how to delete a file from CMD in Windows 10 because in MrAppsGeek you will learn the basic commands inherited from DOS to be able to delete documents from the command prompt easily and quickly..
What Commands Do I Need To Delete Files From CMD In Windows 10?
3 are the basic commands inherited from the archaic MS-DOS operating system (to which I am immensely fond) to be able to delete a file from the command prompt in Windows 10, 8 or 7. These commands would be the following:
- CD..
- Dir
- Of the
What Is Cd.. In CMD And What Is It For?
Cd is the acronym for « Change D irectory » It is used both to enter a folder and to exit it:
- cd.. (to exit).
- cd + the folder name (to enter): Example, “cd Windows”.
What is Dir in CMD and what is it for?
Dir is one of the most basic MS Dos commands and allows us to have a list of directories, that is, a list of files and folders .
What is del in CMD and what is it for?
Del is the command that allows us to delete documents and folders in Ms-Dos.
How to Delete a File From CMD in Windows 10 Easy and Fast 2023
To delete documents from the command prompt in Windows 10 , the first thing we must do is the following:
- Press start with the right mouse button.
- We select Windows PowerShell in administrator mode .
Once inside we must write the following command:
- CD..
In this way we will go to the root directory, we will have to repeat the process as many times as necessary until we reach where the file we want to delete is located. On the contrary, if we want to enter a folder we will do the following:
- cd foldername
Once we are in the folder where the document to be deleted is located, we will follow these steps:
- We execute the command “Dir” (without quotes).
- In this way we will have access to the entire list of directories (files, folders and documents).
To delete a file from the command prompt in Windows 10 we must write the following:
- del thefilename.itsextension
In my case I wanted to delete a file called “archivodeprueba.txt” because I will put the following:
- from testfile.txt
And that’s it, these would be the steps you must follow to delete files from CMD in Windows 10, 8 or 7 step by step . If you have any questions, you can leave them formulated in comments, it would be greatly appreciated if you shared this article with your social networks.