Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use dir structure Tree in cmd

Shulou Source: shulou.com Published: 2022-06-03 06:53:27 11月09日 Update

This article will explain in detail how to use dir structure tree to display code in cmd. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The code is as follows:

@ rem this BAT file name must not be "tree.bat", otherwise the tree command will be effective. I don't know why.

@ rem may be because the system directory has "tree.com", the system will be confused.

@ rem uses "dir.bat" as the file name, but it's okay.

@ echo off

Rem generates a beautiful structure tree in the current directory

Tree / f > 1.TXT

Rem is like the DIR command, but each subordinate directory file is also listed

DIR / S > 2.txt

Rem succinctly lists the current directory files

DIR / d > 3.txt

On "how to use dir structure tree display code in cmd" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Tags: Directory file tree code article command file name more system good practical beautiful concise subordinate content utility article knowledge reference help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Xiaomi NVidia Microsoft Redmi