Output of tree in command prompt

后端 未结 5 1857
耶瑟儿~
耶瑟儿~ 2021-01-30 17:22

I was hoping to be able to use the

tree /F /A > \"desktop\"\\file.txt

command to output only text files. Currently as is, it outputs every

5条回答
  •  半阙折子戏
    2021-01-30 17:44

    It's actually not that hard to get your desired TREE output using FINDSTR regular expressions. :-)

    tree /f /a | findstr /ri /c:"^[^| ]" /c:"^[| ]*[+\\]" /c:"\.txt$"
    

提交回复
热议问题