
It’s worth noting that if you try to delete a non-empty directory, you will get an error message. If you need to create or delete folders, you would use the MKDIR and RMDIR commands. Also, if you need to delete a file that has spaces in the name, you have to use quotes like DEL “This is a test.txt”. Also, you have to enter the file name with the extension, so it would be DEL Test.txt to delete that file. When you use the command this way, it won’t prompt you to confirm before deleting the file, so make sure you have typed in the correct file name. To delete a file, we can simply type in DEL filename and that will delete the file.

Again typing in DEL /? will give you some useful info on the command. If you want to delete a file, you would use the DEL command. So now that we have a list of files and folders, let’s continue with our deleting a virus example. The cool thing about DOS is that you can include several parameters for each command, so you could type in DIR /P /W and get a page-by-page view along with wide format: Or you could type in DIR /W to get the list in a wide format rather than one single column. You can type in DIR /? and see what parameters you can pass to it.Īs you can see, you could type in DIR /P to give the list in a paginated format that you can browse through slowly. You’ll now get a giant list of all of the files and folders in that directory. Now that you are in that directory, you may want to view all of the files and directories first, so you can type in the command DIR and press Enter. You current directory at the prompt will now change to: So if you wanted to change from the default user profile directory to the Windows System32 directory to delete a virus file, you would type in the following to navigate to that directory:
DOS COMMANDS WINDOWS 10 HOW TO
For example, typing in CD /?, will present you with a quick tutorial on how to use the CD command:Īs you can see from above, the MS DOS command CD displays the name of or changes the current directory. You can also find out more detailed information about the parameters and how to use each command by typing in the command name followed by a /?. When you do that, you’ll get a list of all the commands you can use in MS DOS and a short description of what they do:

So what to do now!? Well, since I can’t explain everything, you’ll probably want to end up using some of the help guides that are provided in MS DOS itself by typing in HELP and pressing Enter. You’ll now see a large black window with the cursor at the end of the path to your user profile in C:\Documents and Settings\Username or C:\Users\Username.
