Command Prompt or abbreviated as CMD is a Windows terminal which is now very efficient in opening important data or files. The function of the Command Prompt (CMD) is to be able to find out the ins and outs of a Windows system, one of which can delete important files and folders in your directory.
Well, this time the author will provide a very easy bit of knowledge about how to delete files and folders using CMD. Here’s how.
EASY WAYS TO DELETE FILES AND FOLDERS USING COMMAND PROMPT (CMD)
1. Simultaneously press the Windows + R (Run) keys on your laptop keyboard . Then type CMD and click OK.
2. The Command Prompt (CMD) window appears, then type in the directory where the file or folder you want to delete. This time the author will give an example in the Local Disk C directory. If you want to switch drives and delete files and folders on Local Disk D you can type the command “D:” (without the quotes) and press Enter.
3. After entering the Local Disk C directory, then press the command “dir“. The function of this DIR is to know or see the files and folders that you store on the Local Disk C drive. You can see the results in the image below.
After appearing your data and files, then find the file or folder you want to delete. If you want to delete a file, type del [filename], if you want to delete a folder, type the command rd [filename_folder]. For example, the author will delete the books folder and delete the file named usernames.txt.
CMD DELETE FILE
Delete files on the Local Disk C drive, I will delete files with the name “usernames” with the command del usernames.txt. Then the delete notification will appear then type Y , then Enter. You can see the results below.
CMD DELETE FOLDER
Delete the folder on the Local Disk C drive, the author will delete the folder with the name “book” with the command rd book then press Enter . You can see the results in the image below.
This is the tutorial on how to delete files and folders via CMD. May be useful.
Also read : How to Create a New Folder Using Command Prompt (CMD)