About the del command

Source: Internet
Author: User

The del command is used to delete a specific file, but if you do not specify the file's extension when you delete the file, the file cannot be found
And if the file name you want to delete contains spaces, the command is automatically recognized as a few files, the file from the space
Divided into several, and then it shows that the file could not be found.


C:\users\jason>del/?
Delete one or several files.

DEL [/P] [/F] [/S] [/q] [/a[[:]attributes]] Names
ERASE [/P] [/F] [/S] [/q] [/a[[:]attributes]] Names

names specifies one or more files or directory lists.
Wildcard characters can be used to delete multiple files.
If a directory is specified, the directory in which the
Any files will be deleted.

/P Prompt for confirmation before deleting each file.
/F Forces the deletion of read-only files.
/S Deletes the specified file in all subdirectories.
/q Quiet mode. When you delete a global wildcard, you do not require confirmation
/A Select files to delete based on attributes
Property R read-only file S system file
H hidden file A archive file
I no content index file L re-parse point
-prefixes that indicate "no"

If the command extension is enabled, DEL and ERASE are changed as follows:

The display syntax of the/S switch is reversed, indicating that only
Please press any key to continue ...
The del command can specify the file and cannot delete the folder, and the RD command can only delete the folder (including the files inside), but cannot delete only one of the files inside.
The del command is then more convenient and efficient when combined with wildcard characters. For example, the following can delete all the contents of a folder (will automatically give a hint),
You can also delete all files with the same extension, or delete files with different extension names but with the same file name.
We need to run the command prompt as an administrator if there are some times when the deletion will not be dropped.
C:\users\jason>del c \ New Folder \*
C # New Folder \*, are you sure (y/n)? Y
C:\users\jason>del c \ New Folder \*.txt
C:\users\jason>del C: \ New folder \ new text document. *
C:\users\jason>
Go back, my 32-bit Diskgenius is also copied into the U disk.
Then the RD and Del commands delete something when there is a usage of the file that is being used is not deleted. This is the time to see
My diskgenius is out of line. There is a startup disk that is sure to be possible. Start the disk a bit faster, too.
It is very slow to have Rd and Del commands to delete the entire drive letter. Because you can't just format the whole thing like a startup disk.
Drive letter. Because under Windows we do not have permission to delete or format the entire drive letter.

commands such as Rd and Del, their parameters can be changed in order. For example rd/q/s and rd/s/q are the same.

About the del command

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.