Type: External (6.0 and later)
Syntax:
DELTREE [/Y] [d:]path [d:]path[…]
Purpose: Deletes (erases) a directory including all files and subdirectories that are in it (new with DOS Version 6).
Discussion
Unlike the RMDIR command, the DELTREE command allows you to delete a directory even if it contains files and subdirectories. All files and subdirectories subordinate to the directory you are deleting will also be deleted regardless of any attributes. This means that even if a file has hidden, system, read-only, or other attributes, it will still be deleted. You can specify more than one directory for deletion.
When using wildcards with the DELTREE command you should be extremely cautious because both directories and files with names that match the wildcard will be deleted. Option /Y – Carries out the DELTREE command without providing a prompt to confirm the deletion.
Examples
To delete the directory LETTERS including all files and subdirectories contained in it, enter DELTREE c:\letters