Answers:
在这里找到https://stackoverflow.com/questions/11004731/output-of-tree-in-command-prompt
tree /f /a | findstr /ri /c:"^[^| ]" /c:"^[| ]*[+\\]" /c:"\.h$"
tree /f /a | findstr /ri /c:"^[^| ]" /c:"^[| ]*[+\\]" /c:"\.[ch]p*$"
为我工作,取决于你想添加多少文件扩展名