Print a Directory Tree on Windows
Show folders and files as an indented tree from the command line.
01Command
$ tree /f02What it does
The Windows tree command draws the folder hierarchy with connector characters. The /f switch includes file names, /a uses plain ASCII lines for compatibility, and you can pass a drive or path to start elsewhere. It is a quick way to document a project layout.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- treeEvidence: Windows command that graphically displays the folder structure; /f includes files.
Last verified: 2026-09-20 · Category: Files & Folders
06Related solutions
Robocopy is Windows' built-in robust file copier: use /MIR to keep a destination folder as an exact one-way mirror of a source, resumable and restartable.
One pipeline that renames every matching file in a folder using regular expressions — safer and far more flexible than third-party renamers.
Use the System File Checker to verify every protected Windows system file against known-good copies and automatically replace the damaged ones.