Del command for DOS file deletion

Source: Internet
Author: User

The Del command is easy to use. You can use the "del file path" format. For example, delete test.txt under the d directory and use del D: \ test.txt.
However, not all files can be done by using the del command. For example, if D: \ test.txt has a hidden attribute, if only del D: \ test.txt is used, D: \ test.txt will not be moved. How to delete it? At this time, you need to add some auxiliary parameters to Del. The hidden attribute is den, del/A: H, read-only attribute is read, and del/A: R is used, if the system attribute is system and del/A: S is used, if you do not know what the object attribute is, use del/a-but there is one exception, when a file has a read-only attribute, you must add the del/A/F parameter. Therefore, if you want to forcibly delete a file that does not know the attribute, using del/A/F statements is the safest practice. Here, the/F parameter indicates that the file with the read-only attribute is forcibly deleted, and F indicates that the file is taken from the force parameter.
For a while, the Weijin virus swept the Internet and destroyed a lot of files as a result. The most important thing is to generate a desktop under each directory. INI file, you just need to put these desktop. if the INI file is deleted, the virus will not be harmful. To delete the desktop under each directory. INI files, if you click open sub-folders to delete them one by one, it will be annoying. If you use the del command, a simple statement can be done, that is: run del/A/f/s desktop in the specified directory. INI command. Here,/s indicates searching all subfolders in the current directory and deleting the meaning of the specified object. S is taken from sub, indicating the meaning of "subordinate" and "subdirectory.
Deleting a file is a very dangerous thing. If you accidentally delete an important file, you may need to be careful when performing the delete operation. If you need to confirm before deletion, you can add a parameter:/P.
Of course, you do not need to confirm the deletion operations one by one. You can select the silent deletion mode. In this case, you need to use the parameter:/Q, or the abbreviated form of quiet.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.