This utility prints directory structure of any folder. It is similar to the Tree command on Windows but works on other operating systems like Linux or Mac OS X.
Example 1
java -jar DirTree.jar
This prints the contents of the current directory in the following format.
Displaying directory tree for: C:\java\FileTree\.
               |   DirSummary.class
               |   DirTree.class
|   .classpath
|   .project
Total bytes:   12402
Total files:   6
Total folders: 10

Example 2
java -jar DirTree.jar C:\temp
This example takes a path for parameter in prints that folder instead of the current directory.
Example 3
java -jar -noSummary -fullName DirTree.jar C:\temp
In addition to the path, this example takes -noSummary and -fullName for parameters. -fullName prints the entire file name rather than displaying the names in a tree like structure. The -noSummary hides the summarized view.
Example 4
java -jar -noSummary -fullName DirTree.jar C:\temp > fileNames.txt
Same as example 3 but saves the data to fileNames.txt file rather than displaying the results on console.


Social Media

Powered by