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

前端 未结 12 1739
清歌不尽
清歌不尽 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:49

    I've succeeded getting the output as it is in console, with all non-ascii characters not converted, by outputting to the console (just tree) and then copying from it (system menu -> Edit -> Mark, selecting all, Enter). Console buffer size should be increased in advance, depending on number files/folders, in the console's properties (system menu -> Properties). Other ways didn't work. tree|clip, mentioned in an earlier post, converts non-ascii characters to ascii ones the same as tree>file.txt.

提交回复
热议问题