Tree

Graphically displays the directory [folder] structure of a given drive or path. Optionally includes filelist in display.

Usage:

 Syntax: TREE [d:][path] [/F] [/A]
   d:path
       The drive and path to start from.  If no path is given, start
       from the current directory.
   /F  Display the names of files in each directory.
   /A  Use ASCII characters to visually represent the directory
       structure.

   /?  Display help and exit.

 Additional Options in FreeDOS pdTree: (Not available in standard Tree.)
   /V  Display version information and exit.
   /S  Shortnames only (uses short, ie alternate, filename when exists).
       DOS version only, disables use of LFN API for findfirst/next.
   /P  Pause after each page.  
       On error obtaining current console size, defaults to 80x25 screen,
       otherwise attempts to use current console size.  Note: DOS version
       [under NT console] limited to standard video mode sizes, 
       ie. only 22,25,28,43, or 50 rows [depending on current console height].
       Pause option ignored if output is redirected to file or piped to
       another program, such as  tree | more  or  tree > myfile.txt.
   /Dx Display additional information.
       /Da  show file and directory attributes  (See also /Dh option)
            D directory (only shown for directory entries)
            0 sparse file (only displayed for file entries)
            A archive
            C compressed
            E encrypted
            S system
            H hidden
            R read-only
            M reparse {mount} point (only shown for directory entries)
       /Df  show filesize
            Only useful if /F also specified.  For files less than 1MB, sizes
            are shown in bytes, otherwise size is shown in KB.
            Win32 only: supports filesizes > 4GB
       /Dh  enables showing hidden and system directory and file entries.
       /Dr  display results (file and subdirectory count) after each one.

       Using /F /Da /Dh provides information similar to attrib /S /D.
       Using /F /Df /Dr provides results similar to dir.
   /On Sort output, where n is F (filesize), N (name), E (extension).
       Output is sorted provided enough memory is available, otherwise
       output is unsorted to avoid aborting due to out of memory errors.
       Not Yet Implemented!
   /U  Use Unicode (UTF-8) characters [Experimental].
       This option is useful for displaying results in a WinNT GUI program.
       This feature is intended for use when redirecting to a file (or other
       process).  A BOM (Byte Order Mark) signature is the first character
       output if no errors occur.  [As output is UTF-8, the BOM is only used
       to indicate data is Unicode in UTF-8 format and not to mark byte 
       order.]  Can not be used with the /A option (rightmost one takes
       precedence).  Unicode directory and file names will only be displayed
       correctly when using Windows NT (when Unicode Win32 APIs are available)
       if the corresponding name can not be converted to current ANSI charset.
       The DOS version does not attempt to map from extended characters
       properly, so results for extended ASCII (>127) characters will most
       likely be incorrect.  As such, the /U option may be removed from
       the DOS executables.

Examples:

To display the complete directory hierarchy of drive C and pause
after each screenful, run tree specifying C: as the start path and
pipe its output to the more command:

tree C:\ | more

When using pdTree, the above example may also be achieved using:

tree C:\ /p

To display the directory hierarchy of a subdirectory and have the
output only use standard ASCII characters (such as for printing or
sending to someone who may view it without DOS line/box drawing character
support), specify the subdirectory and the /A switch:

tree ASUBDIR /a

To display the structure of a directory tree and the files within
each directory, add the /F switch:

tree /f | more

To get a listing of all files and directories, with file sizes and attributes,
along with summary of how many in each directory, maintaining Unicode
names, and for review with a utf-8 compatible text viewer:

tree /f /dh /df /da /dr /u \ > myfiles.txt


Copyright: This document is public domain, only public domain additions will be accepted.
Thus this document may be freely copied, etc. but no warranty, claim of correctness, nor fitness for any purpose is given.
KJD 2003,2004