CMD del command file Delete _dos/bat

Source: Internet
Author: User
The use of the DEL command is simple, using the "Del file path" format. For example, to remove the test.txt in the D-packing directory, use del d:\test.txt.
However, not all files can be handled with the DEL command, such as files with hidden attributes, read-only attributes, or system attributes, if D:\test.txt has hidden attributes, if only del D:\test.txt, D:\test.txt will not budge. How do I delete it? At this time, you need to add some auxiliary parameters to the Del, the hidden attribute is hidden, using del/a:h, read-only property, the use of Del/a:r, System properties are systems, using del/a:s, if you do not know what the file attributes, then, the use of del/a can In one case, the exception is that when a file has a read-only property, the del/a/F parameter is added, so it is the safest practice to use the DEL/A/F statement If you want to force the deletion of a file that does not know the attribute. Here, the/f parameter indicates the meaning of forcing a read-only property file to be deleted, and F is taken from foce, which means coercion.
A period of time, Sunway virus rampant network, to cuikulaxiu the potential to destroy a lot of files, of which, the most critical point is in each directory generated a Desktop.ini file, as long as the Desktop.ini files deleted, the virus is no harm. To delete each directory under the Desktop.ini file, if the point open a subfolder deleted, will be annoying, if the use of Del command, a simple statement can be done, that is: in the specified directory to execute del/a/f/s desktop.ini command. Here,/s represents the search for all subfolders under the current directory and deletes the meaning of the specified file, which is taken from the sub and represents the meaning of "subordinate", "subdirectory".
Deleting files is a very dangerous thing, a little careless, you may delete important files, so, in the execution of the delete operation, need to be cautious. If you need to confirm before deleting, you can add a parameter:/P.
Of course, for a very safe deletion, you do not need to confirm each one, you can choose the silent deletion mode, this time, you need to use parameters:/q, that is, quiet abbreviation.

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.