[windows] Tree view of a directory/folder in Windows?

In Linux/KDE, I can see a directory as a tree. How can I do it in Windows 7?

Consider I do NOT mean "Windows Explorer". This just shows the directories, I also want the files.

This question is related to windows tree directory windows-explorer

The answer is


TreeSize professional has what you want. but it focus on the sizes of folders and files.


I recommend WinDirStat.

I frequently use WinDirStat to create screen shots for user documentation of open folders and their contents.

It even uses the correct icons for Windows registered file types.

All I would say is missing is an option to display the files without their icons. I can live without it personally, since I am usually pasting the image into a paint program or Visio to edit it, but it would still be a useful feature.


In the Windows command prompt you can use "tree /F" to view a tree of the current folder and all descending files & folders.

In File Explorer under Windows 8.1:

  • Select folder
  • Press Shift, right-click mouse, and select "Open command window here"
  • Type tree /f > tree.txt and press Enter
  • Use MS Word to open "tree.txt"
  • The dialog box "File Conversion - tree.txt" will open
  • For "Text encoding" tick the "MS-DOS" option

You now have an editable tree structure file.

This works for versions of Windows from Windows XP to Windows 8.1.


If it is just viewing in tree view,One workaround is to use the Explorer in Notepad++ or any other tools.


You can use Internet Explorer to browse folders and files together in tree. It is a file explorer in Favorites Window. You just need replace "favorites folder" to folder which you want see as a root folder


tree /f /a

About

The Windows command tree /f /a produces a tree of the current folder and all files & folders contained within it in ASCII format.

The output can be redirected to a text file using the > parameter.

Method

For Windows 8.1 or Windows 10, follow these steps:

  1. Navigate into the folder in file explorer.
  2. Press Shift, right-click mouse, and select "Open command window here".
  3. Type tree /f /a > tree.txt and press Enter.
  4. Open the new tree.txt file in your favourite text editor/viewer.

Note: Windows 7, Vista, XP and earlier users can type cmd in the run command box in the start menu for a command window.


Examples related to windows

"Permission Denied" trying to run Python on Windows 10 A fatal error occurred while creating a TLS client credential. The internal error state is 10013 How to install OpenJDK 11 on Windows? I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."? git clone: Authentication failed for <URL> How to avoid the "Windows Defender SmartScreen prevented an unrecognized app from starting warning" XCOPY: Overwrite all without prompt in BATCH Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory how to open Jupyter notebook in chrome on windows Tensorflow import error: No module named 'tensorflow'

Examples related to tree

Tree implementation in Java (root, parents and children) Build tree array from flat array in javascript Binary Search Tree - Java Implementation Difference between "Complete binary tree", "strict binary tree","full binary Tree"? Tree view of a directory/folder in Windows? Definition of a Balanced Tree Difference between binary tree and binary search tree How to create a collapsing tree table in html/css/js? How to search JSON tree with jQuery Non-recursive depth first search algorithm

Examples related to directory

Moving all files from one directory to another using Python What is the reason for the error message "System cannot find the path specified"? Get folder name of the file in Python How to rename a directory/folder on GitHub website? Change directory in Node.js command prompt Get the directory from a file path in java (android) python: get directory two levels up How to add 'libs' folder in Android Studio? How to create a directory using Ansible Troubleshooting misplaced .git directory (nothing to commit)

Examples related to windows-explorer

How to add a "open git-bash here..." context menu to the windows explorer? Tree view of a directory/folder in Windows? How can I open Windows Explorer to a certain directory from within a WPF app? Copy a file list as text from Windows Explorer Windows Explorer "Command Prompt Here"