Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: ERASE (DEL)
 Description
 Syntax
 Parameters
 Swithches
 Related Commands
 Remarks
  Using the /P switch
  Deleting more than one file at a time
 Examples

MS DOS Command: ERASE (DEL)

Reference from Microsoft MS-DOS cmd help

Description

Deletes the files you specify.

Syntax

DEL [drive:][path]filename [/P] ERASE [drive:][path]filename [/P]

Parameters

[drive:][path]filename Specifies the location and name of the file or set of files you want to delete.

Swithches

/P Prompts you for confirmation before deleting the specified file.

Related Commands

For information about retrieving a deleted file, see the UNDELETE command.

For information about removing a directory, see the RMDIR command.

For information about deleting a directory, its files, and all subdirectories and files subordinate to it, see the DELTREE command.

Remarks

Using the /P switch

If you use the /P switch, DEL displays the name of a file and prompts you with a message in the following format:

filename, Delete (Y/N)?

Press Y to confirm the deletion, N to cancel the deletion and display the next filename (if you specified a group of files), or CRTL+C to stop the DEL command.

Deleting more than one file at a time

You can delete all the files in a directory by typing the DEL command followed by [drive:]path. You can also use wildcards (* and ?) to delete more than one file at a time. However, you should use wildcards cautiously with the DEL command to avoid deleting files unintentionally. Suppose you type the following command:

del *.*

DEL displays the following prompt:

All files in directory will be deleted! Are you sure (Y/N)?

Press Y and then ENTER to delete all files in the current directory, or

press N and then ENTER to cancel the deletion.

Before you use wildcards with the DEL command to delete a group of files, you can use the same wildcards with the DIR command to see a list of the names of all the files included in the group.

CAUTION: Once you delete a file from your disk, you may not be able to retrieve it. Although the UNDELETE command can retrieve deleted files, it can do so with certainty only if no other files have been created or changed on the disk. If you accidentally delete a file that you want to keep, stop what you are doing and immediately use the UNDELETE command to retrieve the file.

For more information on undeleting files, see the chapter "Managing Your System" in the MS-DOS User's Guide.

Examples

To delete the CAT.TMP file from the TEST directory on drive C, you can use either of the following commands:

del c:\test\cat.tmp

erase c:\test\cat.tmp

To delete all the files in a directory named TEST on drive C, you can use either of the following commands:

del c:\test

del c:\test\*.*


©sideway

ID: 110700177 Last Updated: 7/26/2011 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Travel 18

Reference 79

Computer

Hardware 254

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019