Subversion Repositories SvarDOS

Rev

Rev 2019 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<html><head><title>Tree</title></head>
<body bgcolor="lightgrey">
<h1>Tree</h1>

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

<h2>Usage:</h2>
<pre>
 Syntax: <strong>TREE</strong> [d:][path] [<b>/F</b>] [<b>/A</b>]
   d:path
       The drive and path to start from.  If no path is given, start
       from the current directory.
   <b>/F</b>  Display the names of <u>f</u>iles in each directory.
   <b>/A</b>  Use <u>A</u>SCII characters to visually represent the directory
       structure.

   <b>/?</b>  Display help and exit.

 Additional Options in FreeDOS pdTree: (Not available in standard Tree.)
   <b>/V</b>  Display <u>v</u>ersion information and exit.
   <b>/S</b>  <u>S</u>hortnames only (uses short, ie alternate, filename when exists).
       DOS version only, disables use of LFN API for findfirst/next.
   <b>/P</b>  <u>P</u>ause 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.
   <b>/D<i>x</i></b> <u>D</u>isplay additional information.
       /Da  show file and directory <u>a</u>ttributes  (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 <u>f</u>ilesize
            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 <u>h</u>idden and system directory and file entries.
       /Dr  display <u>r</u>esults (file and subdirectory count) after each one.
       /Ds  show alternate data <u>s</u>treams
            Only useful if /F also specified.
            Note: only useful on NT systems with NTFS, ignored on DOS systems

       Using /F /Da /Dh provides information similar to attrib /S /D.
       Using /F /Df /Dr provides results similar to dir.
   <b>/O<i>n</i></b> Sort <u>o</u>utput, 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!
   <b>/U</b>  Use <u>U</u>nicode (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.
</pre>
<br />
<h2>Examples:</h2>
<p>To display the complete directory hierarchy of drive C and pause <br />
 after each screenful, run tree specifying C: as the start path and <br />
 pipe its output to the more command:<br />
<br />
<samp> tree C:\ | more </samp>
</p>

<p>When using pdTree, the above example may also be achieved using:<br />
<br />
<samp> tree C:\ /p </samp>
</p>

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

<p>To display the structure of a directory tree and the files within <br />
 each directory, add the /F switch:<br />
<br />
<samp> tree /f | more </samp>
</p>

<p>To get a listing of all files and directories, with file sizes and attributes,<br />
 along with summary of how many in each directory, maintaining Unicode<br />
 names, and for review with a utf-8 compatible text viewer:<br />
<br />
<samp> tree /f /dh /df /da /dr /u \ > myfiles.txt </samp>
</p>

<p />
<hr />
<p />

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

</body>
</html>