HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
, DELTREE (short for ''delete tree'') is a
command line A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
command Command may refer to: Computing * Command (computing), a statement in a computer language * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on Apple Macintosh computer keyboards * ...
in some
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s,
SpartaDOS X SpartaDOS X (or SpartaDOS 4.0) is a disk operating system for the Atari 8-bit family of computers that closely resembles MS-DOS. It was developed and sold by ICD, Inc. in 1987-1993, and many years later picked up by the third-party community S ...
and
FreeDOS FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running Legacy system, legacy software and supporting embedded system ...
that recursively deletes an entire subdirectory of files.


Overview

When IBM and Microsoft introduced
PC DOS PC or pc may refer to: Arts and entertainment * Player character or playable character, a fictional character controlled by a human player, usually in role-playing games or computer games * ''Port Charles'', an American daytime TV soap opera * ...
1.0 and
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
1.0, subdirectories were not yet supported. 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. 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. By 1991 at least one competing product,
DR-DOS DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
, had introduced a well-received utility that enabled recursive file deletion. With the introduction of MS-DOS 6.0, Microsoft regained parity by adding the DELTREE command. DELTREE was retained in
Windows 9x Windows 9x is a generic term referring to a series of Microsoft Windows computer operating systems produced from 1995 to 2000, which were based on the Windows 95 kernel and its underlying foundation of MS-DOS, both of which were updated in subs ...
but was not shipped in
Windows NT Windows NT is a proprietary graphical operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems sc ...
family of operating systems. Instead, the
rmdir In computing, rmdir (or rd) is a command (computing), command which will remove an empty directory (file systems), directory on various operating systems. Implementations The command is available in Unix (e.g. macOS, Solaris (operating system), ...
(alias rd) command removes a subdirectory along with all its files if the /S
command-line switch A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive command Command may refer to: Computing * Command (computing), a statement in a computer language * COMMAND.COM, the default operating system ...
is given.


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 COMMAND.COM is the default command-line interpreter for MS-DOS, Windows 95, Windows 98 and Windows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot (init proc ...
. 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. Unlike most other commands that operated on the file system, multiple directories could be passed to the command at one time. 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. In theory, deleted material could be recovered.
Datalight Datalight was a privately held software company specializing in power failsafe and high performance software for preserving data integrity in embedded systems. The company was founded in 1983 by Roy Sherrill, and is headquartered in Bothell, Washi ...
ROM-DOS Datalight was a privately held software company specializing in power failsafe and high performance software for preserving data integrity in embedded systems. The company was founded in 1983 by Roy Sherrill, and is headquartered in Bothell, Washi ...
also includes an implementation of the command. The
FreeDOS FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running Legacy system, legacy software and supporting embedded system ...
version was developed by Charles Dye and is licensed under the
GPL v2 The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general us ...
.


Syntax

The command-syntax is: DELTREE YDRIVE:]
ATH Ath (; nl, Aat, ; pcd, Ât; wa, Ate) is a city and municipality of Wallonia located in the province of Hainaut, Belgium. The municipality consists of the following districts: Arbre, Ath, Bouvignies, Ghislenghien, Gibecq, Houtaing, Irc ...


Use in malware and sabotage

DELTREE was designed to ignore all file and directory attributes, such as ''hidden'', ''read-only'' and ''system''. The command was described as "potentially dangerous" and "capable of wiping out hundreds of files at a time". Combined with the PURGE command (which prevented data recovery), it became an example of a worst-case payload for
malware Malware (a portmanteau for ''malicious software'') is any software intentionally designed to cause disruption to a computer, server, client, or computer network, leak private information, gain unauthorized access to information or systems, depri ...
as well as figuring in one of the early computer sabotage trials. Contributing to the problem is the fact that MS-DOS and Windows 9x do not support
discretionary access control In computer security, discretionary access control (DAC) is a type of access control defined by the Trusted Computer System Evaluation Criteria (TCSEC) as a means of restricting access to objects based on the identity of subjects and/or groups to w ...
to mitigate this issue. The Windows NT family does. Furthermore, starting with
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
,
mandatory access control In computer security, mandatory access control (MAC) refers to a type of access control by which the operating system or database constrains the ability of a ''subject'' or ''initiator'' to access or generally perform some sort of operation on a ...
and
User Account Control User Account Control (UAC) is a mandatory access control enforcement feature introduced with Microsoft's Windows Vista and Windows Server 2008 operating systems, with a more relaxed
further mitigate the issue.


See also

*
List of DOS commands This article presents a list of commands used by DOS operating systems, especially as used on x86-based IBM PC compatibles (PCs). Other DOS operating systems are not part of the scope of this list. In DOS, many standard system commands were pro ...


References


Further reading

* *


External links


MS-DOS and Windows command line deltree command
{{Windows commands External DOS commands Windows administration File deletion