Developer(s) | Microsoft, Datalight, Charles Dye |
---|---|
Initial release | March 1993 |
Operating system | MS-DOS 6, SpartaDOS X, ROM-DOS, FreeDOS, Windows 9x |
Type | Command |
License | MS-DOS, ROM-DOS, Windows: Proprietary commercial software FreeDOS: GPL v2 |
In computing, DELTREE
(short for delete tree) is a command line command in some Microsoft operating systems, SpartaDOS X [1] and FreeDOS [2] that recursively deletes an entire subdirectory of files.
When IBM and Microsoft introduced PC DOS 1.0 and MS-DOS 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. [3] 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, had introduced a well-received utility that enabled recursive file deletion. [4] With the introduction of MS-DOS 6.0, Microsoft regained parity by adding the DELTREE
command. [5]
DELTREE
was retained in Windows 9x but was not shipped in Windows NT family of operating systems. Instead, the rmdir
(alias rd
) command removes a subdirectory along with all its files if the /S
command-line switch is given. [6]
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. [7] 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. [5] Unlike most other commands that operated on the file system, multiple directories could be passed to the command at one time. [8] 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. [9] In theory, deleted material could be recovered. [8]
Datalight ROM-DOS [10] also includes an implementation of the DELTREE
command.
The FreeDOS version was developed by Charles Dye and is licensed under the GPL v2. [11]
The command-syntax is:
DELTREE[/Y][DRIVE:][PATH]
DELTREE
was designed to ignore all file and directory attributes, such as hidden, read-only and system. [9] The command was described as "potentially dangerous" and "capable of wiping out hundreds of files at a time". [5] Combined with the PURGE command (which prevented data recovery), it became an example of a worst-case payload for malware [12] as well as figuring in one of the early computer sabotage trials. [13] [14]
Contributing to the problem is the fact that MS-DOS and Windows 9x do not support discretionary access control to mitigate this issue. The Windows NT family does. Furthermore, starting with Windows Vista, mandatory access control and User Account Control further mitigate the issue.
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, hence being responsible for setting up the system by running the AUTOEXEC.BAT configuration file, and being the ancestor of all processes.
The cd
command, also known as chdir
, is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.
In computing, dir
(directory) is a command in various computer operating systems used for computer file and directory listing. It is one of the basic commands to help navigate the file system. The command is usually implemented as an internal command in the command-line interpreter (shell). On some systems, a more graphical representation of the directory structure can be displayed using the tree
command.
In computing, rmdir
is a command which will remove an empty directory on various operating systems.
fdisk is a command-line utility for disk partitioning. It has been part of DOS, DR FlexOS, IBM OS/2, and early versions of Microsoft Windows, as well as certain ports of FreeBSD, NetBSD, OpenBSD, DragonFly BSD and macOS for compatibility reasons. Windows 2000 and its successors have replaced fdisk
with a more advanced tool called diskpart
.
In computing, XCOPY
is a command used on IBM PC DOS, MS-DOS, IBM OS/2, Microsoft Windows, FreeDOS, ReactOS, and related operating systems for copying multiple files or entire directory trees from one directory to another and for copying files across a network.
MS-DOS Editor, commonly just called edit or edit.com, is a TUI text editor that comes with MS-DOS 5.0 and later, as well as all "x86" SKUs of Windows, until Windows 11. It supersedes edlin, the standard editor in earlier versions of MS-DOS. In MS-DOS, it was a stub for QBasic running in editor mode. Starting with Windows 95, MS-DOS Editor became a standalone program because QBasic didn't ship with Windows.
In computing, CHKDSK
is a system tool and command in DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Microsoft Windows and related operating systems. It verifies the file system integrity of a volume and attempts to fix logical file system errors. It is similar to the fsck
command in Unix and similar to Microsoft ScanDisk, which co-existed with CHKDSK
in Windows 9x and MS-DOS 6.x.
In computing, tree
is a recursive directory listing command or program that produces a depth-indented listing of files. Originating in PC- and MS-DOS, it is found in Digital Research FlexOS, IBM/Toshiba 4690 OS, PTS-DOS, FreeDOS, IBM OS/2, Microsoft Windows, and ReactOS. A version for Unix and Unix-like systems is also available.
In computing, ATTRIB
is a command in Intel ISIS-II, DOS, IBM OS/2, Microsoft Windows and ReactOS that allows the user to change various characteristics, or "attributes" of a computer file or directory. The command is also available in the EFI shell.
In computing, del
is a command in command-line interpreters (shells) such as COMMAND.COM
, cmd.exe
, 4DOS, NDOS, 4OS2, 4NT and Windows PowerShell. It is used to delete one or more files or directories from a file system.
In computing, help
is a command in various command line shells such as COMMAND.COM
, cmd.exe
, Bash, qshell, 4DOS/4NT, Windows PowerShell, Singularity shell, Python, MATLAB and GNU Octave. It provides online information about available commands and the shell environment.
In computing, copy
is a command in various operating systems. The command copies computer files from one directory to another.
In computing, format
, a command-line utility that carries out disk formatting. It is a component of various operating systems, including 86-DOS, MS-DOS, IBM PC DOS and OS/2, Microsoft Windows and ReactOS.
In computing, choice
is a command that allows for batch files to prompt the user to select one item from a set of single-character choices. It is available in a number of operating system command-line shells.
In computing, recover
is a primitive file system error recovery utility included in MS-DOS / IBM PC DOS versions prior to DOS 6.0 and a number of other operating systems.
In computing, diskcomp
is a command used for comparing the complete contents of a floppy disk to another one.
The command-line tool exe2bin
is a post-compilation utility program available on MS-DOS and other operating systems.
MS-DOS 7 is a real mode operating system for IBM PC compatibles. Unlike earlier versions of MS-DOS, it was not released separately by Microsoft, but included in the Windows 9x family of operating systems. Windows 95 RTM report it as MS-DOS 7.0, and Windows 95 OSR 2.x and Windows 98 report as 7.1. The real-mode MS-DOS 7.x is contained in the IO.SYS file.