Tree view of a directory/folder in Windows?

WindowsTreeDirectoryWindows Explorer

Windows Problem Overview


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.

Windows Solutions


Solution 1 - Windows

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.

Solution 2 - Windows

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

Solution 3 - Windows

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.

Solution 4 - Windows

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

Solution 5 - Windows

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

Solution 6 - Windows

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPietroView Question on Stackoverflow
Solution 1 - WindowsJanekView Answer on Stackoverflow
Solution 2 - WindowsWonderWorkerView Answer on Stackoverflow
Solution 3 - WindowsBrian McCormickView Answer on Stackoverflow
Solution 4 - WindowsKarthikView Answer on Stackoverflow
Solution 5 - WindowsCyberPlayerOneView Answer on Stackoverflow
Solution 6 - WindowsEgorView Answer on Stackoverflow