Del (Erase) deletes the specified file _dos/bat

Source: Internet
Author: User
Del (Erase)
Deletes the specified file.

Grammar
del [Drive:][path] FileName [...] [/P] [/F] [/s] [/Q] [/a[:attributes]]

erase [Drive:][path] FileName [...] [/P] [/F] [/s] [/Q] [/a[:attributes]]

Parameters
[Drive:] [Path] FileName
Specifies the location and name of the file or set of files that you want to delete. Need Filename. You can use multiple file names. Separate file names with spaces, commas, or semicolons.
/P
Prompts you to confirm that you want to delete the specified file.
/F
Force Delete read-only file
/s
Deletes the specified file from the current directory and all subdirectories. Displays the name of the file that is being deleted.
/q
Specifies the mute state. You are not prompted to confirm the deletion.
/A
Deletes a file based on the specified property.
Attributes
Specify any of the following file attributes: Attribute description
R Read Only
A archive
s system
H Hidden
-prefix indicating "non"

/?
Display Help at the command prompt.
Comments
Use/P
If you use/p,del, the file name is displayed and the following message is sent:

FileName, Delete (y/n)?

Press Y to confirm the deletion, N cancel the deletion and display the next file name (if a set of files is specified), or press CTRL + C to stop the DEL command.

disabling command Extensions
If you disable command extensions, the/s command line option displays the name of any file not found, rather than displaying the name of the file being deleted (that is, the behavior is the opposite). For more information about disabling command extensions, see cmd in.

Delete multiple files at once
You can delete all the files in a folder by typing the del command, followed by [Drive:]path. For example, the following command deletes all files in the \work folder:

Del \work

You can also use wildcard characters (* and?) to delete multiple files at once. However, use the wildcard character carefully when using the DEL command to avoid accidentally deleting the file. For example, if you type the following command:

Del *.*

The Del command displays the following tips:

All files in directory would be deleted! Are you sure (y/n)?

Press Y and press ENTER to delete all files in the current folder, or press N and then press ENTER to cancel the deletion.

Before you use the DEL command with wildcards to delete a set of files, you can use the dir command with the same wildcard character to view a list of all the file names that are included in the group.

Warning

After you use Del to delete a file from the disk, you cannot recover the file.
You can use the DEL command (with various parameters) from the Recovery Console.
Example
To remove a drive C:\ All files in the folder named Test, type one of the following commands:

Del C:\Test

Del C:\test\*.*

XOX

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.