Back to Blog
Arnošt Havelka

Tree Command

Visualize directory structures graphically.

Start Interactive Lesson
Tree Command

The tree command allows you to view the folder structure of a drive or path graphically. It creates a "branching" visualization that makes it easy to understand the hierarchy of your directories and files.

Try the command

Visualize the folder structure!

Build the command
tree
Terminal
C:\Users\User>tree C:\ /f /a

Common Options

Real-World Examples

1. Basic Directory Tree

View the structure of the current directory.

Command Prompt
C:\Users\User>tree

2. Showing Files

See exactly where files are located within the structure.

Command Prompt
C:\Users\User>tree /f

3. Saving the Tree to a File

This is great for documenting your project structure.

Command Prompt
C:\Users\User>tree /f > structure.txt

Knowledge Check

1 / 2

Which flag makes tree show files, not just folders?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Practical: Ver

Scenario: Checking OS compatibility.