ArticleslgStudy

science

DELTREE

DELTREE is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand DELTREE rather than just read about it. In short: 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. Overview When IBM and Microsoft introduced PC DOS 1.0 and MS-DOS 1.0, subdirectories were not yet supported.

Key takeaways

  • DELTREE belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect DELTREE to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of DELTREE from memory before moving on to harder problems.

Reference excerpt

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.

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. 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. With the introduction of MS-DOS 6.0, Microsoft regained parity by adding the DELTREE command. 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.

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. 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 ROM-DOS also includes an implementation of the DELTREE command. The FreeDOS version was developed by Charles Dye and is licensed under the GPL v2.

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

Further reading Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. 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.

External links

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

Worked examples

Example 1 — a first encounter with DELTREE

Start with the simplest possible case. Write down what DELTREE claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to DELTREE before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about DELTREE ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of DELTREE

In research
DELTREE appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses DELTREE in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
DELTREE is common in secondary-school and first-year university syllabi. It links to neighbouring topics External DOS commands, File deletion, Windows administration, so understanding it makes those chapters shorter.
In everyday life
Look for DELTREE outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “DELTREE” →

How to study DELTREE in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what DELTREE means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain DELTREE out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is DELTREE in simple terms?

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. Overview When IBM and Microsoft introduced PC DOS 1.0 and MS-DOS 1.0, subdirectories were not yet supported.

Why does DELTREE matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study DELTREE?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on DELTREE.

Tags

  • External DOS commands
  • File deletion
  • Windows administration
  • Windows commands

Keep exploring