Display a Directory Tree of all Subdirectories and Files

 http://malektips.com/windows_xp_and_dos_help_and_tips.html

SUMMARY: Display a directory's subdirectories and (optionally) all files contained therein.

 

Ever need to output a list of all the directories and subdirectories on a particular hard drive or removable media? The tree command does just that, and you can pipe the results to a text file for further manipulation or printing.

To view all of the directories and subdirectories on a device, just cd\ to the root of your drive and then execute the tree command. Else, only the subdirectories of the current directory will be displayed.

The following parameters modify the output:

/f

This outputs all files contained in the current directory and subdirectories. Issuing this command from the root directory can show all non-hidden files on the current drive, so the output may be long!

/a

By default, the treecommand uses simple graphics to signify subdirectories. If you are having trouble processing or printing the results, add this parameter to display ASCII characters.

The following example command, executed from the root directory of a hard drive or removable media, creates a text file tree.txt containing all non-hidden files and folders. This may take a while to process, so be patient!

tree /f > tree.txt


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章