方法一
STEP 1
cd 、空格、然後 drag 目標 folder 至 CMD
cmd
cd <folderpath> |
STEP 2
隨意起名,以下例子把導出檔案命名為 output.txt。
cmd
tree /a /f > ouput.txt |
生成的 txt 內容類似這樣
Code
C:. |
方法二
語法
cmd
tree /f > ouput.txt |
生成的 txt 內容類似這樣
Code
C:. |
Options meaning:
/aDisplay the tree using standard ASCII characters./bDisplay the full pathname of each directory, without any of the line-drawing characters./dDisplay file and directory descriptions./fDisplay files as well as directories./hDisplay hidden as well as normal directories. If you combine/hand/f, hidden files are also displayed./tDisplay the time and date for each directory. If you combine/tand/f, the time and date for each file will also be displayed./T:cCreation date and time./T:wLast modification (“write”) date and time (default).
/zDisplay the size of each file./zwithout a/fwill display the subdirectory tree sizes.
純列出,不樹狀
語法
bash
dir /s /b> ouput.txt |
生成的 txt 內容類似這樣
Code
C:\Users\helloword.docx |
純列出,不樹狀,只有檔案名
語法
bash
dir /b /a-d> ouput.txt |
生成的 txt 內容類似這樣
Code
helloword.docx |
References: https://jpsoft.com/help/tree.htm
