Saving 'tree /f /a" results to a textfile with unicode support

前端 未结 12 1705
清歌不尽
清歌不尽 2021-02-02 07:10

I\'m trying to use the tree command in a windows commandline to generate a text file listing the contents of a directory but when I pipe the output the unicode characters get st

12条回答
  •  北海茫月
    2021-02-02 07:58

    The short answer is you cannot and this is because tree.com is an ANSI application, even on Windows 7.

    The only solution is to write your own tree implementation. Also you could file a bug to Microsoft, but I doubt they are not already aware about it.

提交回复
热议问题