Saturday, 25 July 2015

How to Delete a File Using Command Prompt

Have you ever wanted to delete a file using the Command Prompt in Windows? Well, now you can! Amazing!


Steps

Delete a File Using Command Prompt Step 1.jpg
1
Open the command prompt by going to Start > All Programs > Accessories > Command Prompt. Alternately, you can open the run dialog (WinKey + R) and type "cmd" without the quotes. 

Delete a File Using Command Prompt Step 2.jpg
2
Type "del " without the quotes.

Delete a File Using Command Prompt Step 3.jpg
3
Type in the name of the file with the extension, if you are currently in the directory where the file is located, you should be good to go. If you do not know what a file extension is, type in the file into a search box of some kind (it depends on your computer what type of search you have) and right click and then find properties and then there it'll be on the main page. it will be similar to "C:\myfilename.ext".
  • If you are not in the right directory, you can either "cd" to the directory or type the full path to the file to be deleted.
    Delete a File Using Command Prompt Step 3Bullet1.jpg
  • For example, if you wanted to delete "file.txt", you would type "del file.txt". If this file was located on the desktop and you were one directory above, you could type "C:\Users\username\Desktop\file.txt".
    Delete a File Using Command Prompt Step 3Bullet2.jpg

No comments:

Post a Comment