Command: deltree

  DELTREE deletes an entire directory tree, including subdirectories.


  DELTREE [/Y] [/V] [/D] [/X] [/Z:SERIOUSLY] filespec [filespec...]
  DELTREE [/?]
          drive  The drive letter, e.g. C:
          path   The directory, e.g. \example

[Main menu] [top] (Syntax) [Options] [Comments] [Examples] [See also] [File]


  /Y            Deletes specified directories without asking for
  /V            Reports the number of files and subdirectories 
                deleted, and their total size.
  /D            Displays the debug info.
  /X            For testing; don't actually delete anything.
  /Z:SERIOUSLY  Do not prompt when root directory is specified.
  filespec      The directory tree to be deleted, e.g. C:\OLDTREE
                Note that several directory trees can be deleted with
                one command.
  /?            Shows the help.

[Main menu] [top] [Syntax] (Options) [Comments] [Examples] [See also] [File]


  For performance reasons DELTREE overwrites the first letter of each
  filename/directory name by a '?'. It does not delete the file
  itself, but it deallocates the space where the content of the file is
  written. FreeDOS, as other DOSes, recognizes the renamed file/directory
  (myfile.txt becomes ?yfile.txt; pathname becomes ?athname) as deleted,
  no longer shows it and does not offer access to it. Programs like
  DEBUG which have sector access are able to read the contents of the
  file/directory. As long as you do not write on the drive you have a
  chance to restore the files/directories again with UNDELETE, only
  the first character of the filename/directory name will be lost 
  (_yfile.txt /_athname). The only ways to delete the file CONTENTS FOR
  ABSOLUTELY CERTAIN are to fill the disk completely with other files or
  by using a wipeout tool. The only way to delete a file/directory
  NAME FOR ABSOLUTELY CERTAIN is to RENAME (REN) the file/directory
  first (e.g. "a."/"a") and to delete it later (only correct at 8.3 -
  not at long filenames/directory names!)
  Switches must be before filespecs on command line - MS compatible 
  syntax! Otherwise they will be ignored.
  Filespecs may name files, subdirectories, or DR DOS-style file lists.
  DELTREE is a dangerous command!  Use at your own risk.
    00  Success
    01  Something could not be deleted
    03  User abort (Q, control-C)
    16  General syntax error, or buffer overflow
    17  Not enough memory
    18  DOS 3.0 or better required
    19  Problem with list file
    20  Internal buffer overflow
    21  Error resolving directory name (dots_fix)

[Main menu] [top] [Syntax] [Options] (Comments) [Examples] [See also] [File]


  deltree /y c:\oldtree
  deltree c:\test2\   asks for each subdirectory of \test2 if you really
                      want to delete it
  deltree c:\test2    deletes all subdirectory of \test2 

[Main menu] [top] [Syntax] [Options] [Comments] (Examples) [See also] [File]

See also:


[Main menu] [top] [Syntax] [Options] [Comments] [Examples] (See also) [File]


  Please read this command's lsm file also.
  You will find the updated version (internet) here and
  the version described in this manual page here.
  The lsm file contains information about the name of the programmer,
  the download site, and some other command related information.

[Main menu] [top] [Syntax] [Options] [Comments] [Examples] [See also] (File)

  Copyright © 1998 Jim Hall, updated 2007 by W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.