------------------------ MS-DOS v6.22 Help: DELTREE ------------------------
<Notes> <Examples>                                               <Index>
----------------------------------------------------------------------------

                                  DELTREE

Deletes a directory and all the files and subdirectories that are in it.

Syntax

    DELTREE [/Y] [drive:]path [[drive:]path[...]]

Parameter

drive:path
    Specifies the name of the directory you want to delete. The DELTREE
    command will delete all the files contained in the directory you
    specify, as well as all subdirectories and files in the subdirectories
    subordinate to this directory. You can specify more than one directory.

Switch

/Y
    Carries out the DELTREE command without first prompting you to confirm
    the deletion.

Related Commands

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

For information about deleting files, see the <DEL> command.

                                      ***

<Syntax> <Examples>
----------------------------------------------------------------------------

                               DELTREE--Notes

DELTREE and hidden, system, and read-only attributes

The DELTREE command deletes all files contained in a directory or
subdirectory, regardless of attributes.

Errorlevel parameters

If DELTREE successfully deleted the directory, it returns an ERRORLEVEL
value of 0.

Using wildcards with DELTREE

You can use wildcards with the DELTREE command, but use them with extreme
caution. If you specify a wildcard that matches both directory names and
filenames, both the directories and files will be deleted. Before specifying
wildcards with the DELTREE command, use the DIR command to view the files
and directories you will delete.

                                      ***

<Syntax> <Notes>
----------------------------------------------------------------------------

                              DELTREE--Example

To delete the TEMP directory on drive C, including all files and
subdirectories of the TEMP directory, type the following at the command
prompt:

    deltree c:\temp

                                      ***

----------------------------------------------------------------------------
<Top of page>
Last update: December 07, 2002 14:45 by
Content © 1997 Microsoft Corporation
All else © 2000-2005
Counter