Win7 system through the cmd command prompt del command to delete the file detailed tutorial

  

How to use the cmd command prompt del command to delete the file? The cmd command prompt is very powerful, it can complete the specified query, modify, delete and other tasks through some simple commands. Next, Xiaobian mainly shares the common methods of the del command in cmd.

1. Open the cmd command prompt: Take the Windows 7 operating system as an example, click “Start”, enter “cmd” in the "Search programs and files" box, Click “cmd.exe” to bring up the cmd command prompt window.



2. Deleting a single specified file Step 1: Delete the abc.txt file shown in the figure below, you need to type "ld E:\\" in the command prompt window. A\\1\\abc.txt” command, the meaning of this command is to delete the abc.txt file in subfolder 1 of folder A under hard disk E.


3. Delete a single specified file. Step 2: Click the “Enter” button to execute the command. We found that abc.txt has been deleted.


4. When deleting a single specified file, it is displayed "Whether to delete". Tip: If you want to delete the abc.txt file, it is displayed "Whether to delete" or not; In the character window, type the “del /p E:\\A\\1\\abc.txt” command, click the Enter key to execute the command, and the window will display "E:\\A\\1\\abc.txt" to be deleted. (Y/N)? ”, type “Y”, click the Enter key, abc.txt is deleted. /p means to confirm the operation when deleting the specified file.

5. Delete the specified files in all subdirectories: To delete all the text files named abc under the E disk, you need to type “del /s E in the command prompt window: \\abc.txt” command, click the Enter key to execute the command, the window will display all the specified files that have been deleted according to the command requirements. /s means to delete the specified file in all subfolders.

6. When deleting the specified files in all subdirectories, it is displayed "Whether to delete". Tip: Delete all text files named abc under E disk and display "Whether to delete" You need to type the “del /p /s E:\\abc.txt” command in the command prompt window, click the Enter key to execute the command, and follow the prompts.

7, want to understand the usage of a command in cmd, just type "“/?” after the command, as shown in the following figure, type "ld/;del/?” After the command, all usages of the del command are displayed on the form.

Copyright © Windows knowledge All Rights Reserved