DELTREE

DELTREEDeveloper(s)| Microsoft, Datalight, Charles Dye

|

Initial release| March 1993; 33 years ago (1993-03)
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.

## Contents

* 1 Overview
* 2 Implementations
* 3 Syntax
* 4 Use in malware and sabotage
* 5 See also
* 6 References
* 7 Further reading
* 8 External links

## Overview

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]

## 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.[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]

## 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.[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.

## See also

* List of DOS commands

## References

1. ↑ "SpartaDOS X 4.48 User Guide". http://sdx.atari8.info/sdx_files/4.48/SDX448_User_Guide.pdf.
2. ↑ "The FreeDOS Project blog: FreeDOS commands quick-reference". 29 June 2018. http://freedos-project.blogspot.com/2018/06/freedos-commands-quick-reference.html.
3. ↑ Dickinson, John (May 28, 1985). "Stalking the Elusive Subdirectory Path". PC Magazine: p. 231. https://books.google.com/books?id=0diZZaKL2JMC&pg=PA231.
4. ↑ Glass, Brett (July 8, 1991). "MS-DOS 5: Reigning OS improves its value". InfoWorld: pp. 64-66. https://books.google.com/books?id=iVAEAAAAMBAJ&pg=PA66.
5. ↑ 5.0 5.1 5.2 Cooper, Jim (2002). Using MS-DOS 6.22 (3rd ed.). Que. pp. 120-121. ISBN 0-7897-2573-8. https://books.google.com/books?id=u7oN-5y7nGsC&pg=PA120.
6. ↑ No DELTREE Command? - MalekTips
7. ↑ Crayton, Christopher (2008). The A+ Exams Guide: Preparation Guide for the CompTIA Essentials. CompTIA. p. 336. ISBN 978-1-58450-566-2. https://books.google.com/books?id=5asLAAAAQBAJ&pg=PA336.
8. ↑ 8.0 8.1 Mueller, John Paul (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. Wiley. pp. 28-29. ISBN 978-0-470-04616-6. https://books.google.com/books?id=Ua819DVKQPwC&pg=PA29.
9. ↑ 9.0 9.1 Rubenking, Neil J. (November 19, 1996). "User-to-User". PC Magazine: p. 247. https://books.google.com/books?id=yeegNRKq1h0C&pg=RA1-PA247.
10. ↑ "Datalight ROM-DOS User's Guide". https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf.
11. ↑ "FreeDOS 1.2 Updates Package - deltree (FreeDOS Base)". Ibiblio.org. 2013-03-30. http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/deltree.html. Retrieved 2022-09-08.
12. ↑ Glass, Brett (May 2, 1994). "How to safely defuse an ANSI bomb; video scan converters". InfoWorld: p. 40. https://books.google.com/books?id=hDgEAAAAMBAJ&pg=PA40.
13. ↑ Gaudin, Sharon (2000). "Case Study of Insider Sabotage: The Tim Lloyd/Omega Case". Computer Security Journal 16 (3): 1-8. ftp://80.45.19.205/UU/Case Study of Insider Sabotage.pdf. [yes|permanent dead link|dead link}}]
14. ↑ Lange, Michele C. S.; Nimsger, Kristin (2004). Electronic Evidence and Discovery: What every Lawyer Should Know. ABA. p. 15. ISBN 1-59031-334-8. https://archive.org/details/electroniceviden0000lang. The case was litigated as United States v. Lloyd, 269 F.3d 228 (3rd Cir. 201) .

## Further reading

* Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. 2001. ISBN 978-0789725738.
* Tim O'Reilly; Troy Mott; Walter Glenn (1999). Windows 98 in a Nutshell: A Desktop Quick Reference. O'Reilly. ISBN 978-1565924864. https://archive.org/details/windows98innutsh00orei.

## External links

* MS-DOS and Windows command line deltree command
* DELTREE - Delete all subfolders and files

* v
* t
* e

Windows command-line programs and shell builtins

* COMMAND.COM
* Command Prompt
* Windows PowerShell
* Recovery Console

File system navigation|

* cd (chdir)
* dir
* popd
* pushd
* tree

File management|

* attrib
* cacls
* cipher
* compact
* copy
* del (erase)
* deltree
* expand
* icacls
* makecab
* mkdir (md)
* mklink
* move
* recover
* ren (rename)
* replace
* rmdir (rd)
* robocopy
* tar
* xcopy

Disk management|

* chkdsk
* convert
* defrag
* diskcomp
* diskcopy
* diskpart
* drvspace
* fdisk
* format
* label
* manage-bde
* subst
* scandisk
* sys
* vol
* vssadmin

Processes|

* at
* exit
* kill
* powercfg
* runas
* sc
* schtasks
* shutdown
* start
* taskkill
* tasklist

Registry|

* assoc
* ftype
* reg
* regini
* regsvr32

User environment|

* date
* mode
* path
* set
* setx
* time
* title
* ver
* whoami

File contents|

* comp
* edit
* edlin
* fc
* find
* findstr
* print
* type

Scripting|

* choice
* clip
* cscript
* doskey
* echo
* for
* forfiles
* goto
* if
* more
* pause
* prompt
* rem
* timeout

Networking|

* arp
* BITSAdmin
* cURL
* getmac
* hostname
* ipconfig
* net
* netsh
* netstat
* nslookup
* PathPing
* ping
* route
* scp
* sftp
* ssh
* ssh-add
* ssh-agent
* ssh-keygen
* ssh-keyscan
* tracert
* winrm
* winrs

Maintenance and care|

* driverquery
* eventcreate
* eventtriggers
* msiexec
* ntbackup
* sfc
* systeminfo
* w32tm
* WBAdmin
* winsat
* wmic

Boot management|

* bcdedit
* bootcfg
* fixboot
* fixmbr

Software development|

* debug
* exe2bin
* QBasic

Miscellaneous|

* cls
* dism
* dpath
* gpupdate
* help
* MSCDEX
* pentnt
* wsl

* List of DOS commands
* Environment variables

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/DELTREE. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:DELTREE&oldid=783593"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template