DELTREE
In computing, DELTREE (short for delete tree) is a command line command in some Microsoft operating systems, SpartaDOS X and FreeDOS that recursively deletes an entire subdirectory of files.[src]
In computing, DELTREE (short for delete tree) is a command line command in some Microsoft operating systems, SpartaDOS X and FreeDOS that recursively deletes an entire subdirectory of files.[src] ==Overview== When IBM and Microsoft introduced PC DOS 1.0 and MS-DOS 1.0, subdirectories were not yet supported.[src] This state of affairs was remedied with the release of DOS 2.0, which introduced support for subdirectories and directory nesting; however, it had no built-in facility for deleting entire subdirectory trees.[src] Through the release of MS-DOS 5.0, removing nested subdirectories required removing all of the files in the lowest subdirectories, then removing the subdirectory itself, then repeating the process up the directory tree.[src] By 1991 at least one competing product, DR-DOS, had introduced a well-received utility that enabled recursive file deletion.[src] With the introduction of MS-DOS 6.0, Microsoft regained parity by adding the DELTREE command.[src] DELTREE was retained in Windows 9x but was not shipped in Windows NT family of operating systems.[src] Instead, the rmdir (alias rd ) command removes a subdirectory along with all its files if the /S command-line switch is given.[src] ==Implementations== In MS-DOS, PC DOS and Windows 9x, DELTREE was implemented as an external command, with its functionality kept in a separate file outside of COMMAND.COM.[src] Normal operation prompted the user for verification that the specified directories were indeed intended to be removed, but this safeguard could be suppressed with a command-line option.[src] Unlike most other commands that operated on the file system, multiple directories could be passed to the command at one time.[src] An undocumented feature allowed the user to append a trailing "/" character to a directory name in order to preserve the directory but remove everything underneath it.[src] In theory, deleted material could be recovered.[src] Datalight ROM-DOS also includes an implementation of the command.[src] The FreeDOS version was developed by Charles Dye and is licensed under the GPL v2.[src] ==Syntax== The command-syntax is: DELTREE[/Y][DRIVE:][PATH] ==Use in malware and sabotage== DELTREE was designed to ignore all file and directory attributes, such as hidden, read-only and system.[src] The command was described as "potentially dangerous" and "capable of wiping out hundreds of files at a time".[src] Combined with the PURGE command (which prevented data recovery), it became an example of a worst-case payload for malware as well as figuring in one of the early computer sabotage trials.[src] Contributing to the problem is the fact that MS-DOS and Windows 9x do not support discretionary access control to mitigate this issue.[src] The Windows NT family does.[src] Furthermore, starting with Windows Vista, mandatory access control and User Account Control further mitigate the issue.[src] ==See also== List of DOS commands ==References== ==Further reading== ==External links== MS-DOS and Windows command line deltree command DELTREE - Delete all subfolders and files[src]
23 sentences · 23 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"DELTREE." encyclopegia.org, 2025, https://encyclopegia.org/wiki/deltree. Accessed 26 November 2026.
Chicago
"DELTREE." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/deltree.
APA
encyclopegia.org. (2025). DELTREE. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/deltree
Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON