Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to implement batch dir.bat for generating structural trees in the current directory

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to achieve the batch dir.bat of generating the structure tree in the current directory, which is very detailed and has a certain reference value. Interested friends must read it!

Dir.bat

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

The above is all the contents of the article "how to generate a batch dir.bat of a structural tree in the current directory". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report