Windows 中目录/文件夹的树视图?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9518646/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Tree view of a directory/folder in Windows?
提问by Pietro
In Linux/KDE, I can see a directory as a tree. How can I do it in Windows 7?
在 Linux/KDE 中,我可以将目录视为树。如何在 Windows 7 中执行此操作?
Consider I do NOT mean "Windows Explorer". This just shows the directories, I also want the files.
考虑一下我的意思不是“Windows 资源管理器”。这只是显示目录,我也想要文件。
回答by Janek
In the Windows command prompt you can use "tree /F" to view a tree of the current folder and all descending files & folders.
在 Windows 命令提示符下,您可以使用“tree /F”查看当前文件夹和所有降序文件和文件夹的树。
In File Explorer under Windows 8.1:
在 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
- 选择文件夹
- 按住 Shift 键,右键单击鼠标,然后选择“在此处打开命令窗口”
- 键入
tree /f > tree.txt
并按 Enter - 使用 MS Word 打开“tree.txt”
- 将打开“文件转换 - tree.txt”对话框
- 对于“文本编码”,勾选“MS-DOS”选项
You now have an editable tree structure file.
您现在拥有一个可编辑的树结构文件。
This works for versions of Windows from Windows XP to Windows 8.1.
这适用于从 Windows XP 到 Windows 8.1 的 Windows 版本。
回答by WonderWorker
tree /f /a
树 /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.
Windows 命令tree /f /a
以 ASCII 格式生成当前文件夹以及其中包含的所有文件和文件夹的树。
The output can be redirected to a text file using the >
parameter.
可以使用>
参数将输出重定向到文本文件。
Method
方法
For Windows 8.1 or Windows 10, follow these steps:
对于 Windows 8.1 或 Windows 10,请执行以下步骤:
- Navigate into the folder in file explorer.
- Press Shift, right-click mouse, and select "Open command window here".
- Type
tree /f /a > tree.txt
and press Enter. - Open the new
tree.txt
file in your favourite text editor/viewer.
- 导航到文件资源管理器中的文件夹。
- 按住 Shift 键,右键单击鼠标,然后选择“在此处打开命令窗口”。
- 键入
tree /f /a > tree.txt
并按 Enter。 tree.txt
在您喜欢的文本编辑器/查看器中打开新文件。
Note: Windows 7, Vista, XP and earlier users can type cmd
in the run command box in the start menu for a command window.
注意:Windows 7、Vista、XP 和更早版本的用户可以cmd
在命令窗口的开始菜单中的运行命令框中键入。
回答by Brian McCormick
I recommend WinDirStat.
我推荐WinDirStat。
I frequently use WinDirStat to create screen shots for user documentation of open folders and their contents.
我经常使用 WinDirStat 为打开的文件夹及其内容的用户文档创建屏幕截图。
It even uses the correct icons for Windows registered file types.
它甚至为 Windows 注册的文件类型使用正确的图标。
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.
我想说的是缺少一个选项来显示没有图标的文件。我个人可以没有它,因为我通常将图像粘贴到绘图程序或 Visio 中进行编辑,但它仍然是一个有用的功能。
回答by Karthik
If it is just viewing in tree view,One workaround is to use the Explorer in Notepad++ or any other tools.
如果只是在树视图中查看,一种解决方法是使用 Notepad++ 中的资源管理器或任何其他工具。
回答by Egor
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
您可以使用 Internet Explorer 在树中一起浏览文件夹和文件。它是收藏夹窗口中的文件浏览器。您只需要将“收藏夹”替换为您希望作为根文件夹查看的文件夹
回答by u1516331
TreeSize professional has what you want. but it focus on the sizes of folders and files.
TreeSize专业有你想要的。但它专注于文件夹和文件的大小。