Subversion Repositories SvarDOS

Rev

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

Rev Author Line No. Line
2019 mateusz.vi 1
<html><head><title>Tree</title></head>
2
<body bgcolor="lightgrey">
3
<h1>Tree</h1>
4
 
5
<p>Graphically displays the directory [folder] structure of a given
6
 drive or path.  Optionally includes filelist in display.
7
</p>
8
 
9
<h2>Usage:</h2>
10
<pre>
11
 Syntax: <strong>TREE</strong> [d:][path] [<b>/F</b>] [<b>/A</b>]
12
   d:path
13
       The drive and path to start from.  If no path is given, start
14
       from the current directory.
15
   <b>/F</b>  Display the names of <u>f</u>iles in each directory.
16
   <b>/A</b>  Use <u>A</u>SCII characters to visually represent the directory
17
       structure.
18
 
19
   <b>/?</b>  Display help and exit.
20
 
21
 Additional Options in FreeDOS pdTree: (Not available in standard Tree.)
22
   <b>/V</b>  Display <u>v</u>ersion information and exit.
23
   <b>/S</b>  <u>S</u>hortnames only (uses short, ie alternate, filename when exists).
24
       DOS version only, disables use of LFN API for findfirst/next.
25
   <b>/P</b>  <u>P</u>ause after each page.  
26
       On error obtaining current console size, defaults to 80x25 screen,
27
       otherwise attempts to use current console size.  Note: DOS version
28
       [under NT console] limited to standard video mode sizes, 
29
       ie. only 22,25,28,43, or 50 rows [depending on current console height].
30
       Pause option ignored if output is redirected to file or piped to
31
       another program, such as  tree | more  or  tree > myfile.txt.
32
   <b>/D<i>x</i></b> <u>D</u>isplay additional information.
33
       /Da  show file and directory <u>a</u>ttributes  (See also /Dh option)
34
            D directory (only shown for directory entries)
35
 
36
            A archive
37
            C compressed
38
            E encrypted
39
            S system
40
            H hidden
41
            R read-only
42
            M reparse {mount} point (only shown for directory entries)
43
       /Df  show <u>f</u>ilesize
44
            Only useful if /F also specified.  For files less than 1MB, sizes
45
            are shown in bytes, otherwise size is shown in KB.
46
            Win32 only: supports filesizes > 4GB
47
       /Dh  enables showing <u>h</u>idden and system directory and file entries.
48
       /Dr  display <u>r</u>esults (file and subdirectory count) after each one.
49
       /Ds  show alternate data <u>s</u>treams
50
            Only useful if /F also specified.
51
            Note: only useful on NT systems with NTFS, ignored on DOS systems
52
 
53
       Using /F /Da /Dh provides information similar to attrib /S /D.
54
       Using /F /Df /Dr provides results similar to dir.
55
   <b>/O<i>n</i></b> Sort <u>o</u>utput, where n is F (filesize), N (name), E (extension).
56
       Output is sorted provided enough memory is available, otherwise
57
       output is unsorted to avoid aborting due to out of memory errors.
58
       Not Yet Implemented!
59
   <b>/U</b>  Use <u>U</u>nicode (UTF-8) characters [Experimental].
60
       This option is useful for displaying results in a WinNT GUI program.
61
       This feature is intended for use when redirecting to a file (or other
62
       process).  A BOM (Byte Order Mark) signature is the first character
63
       output if no errors occur.  [As output is UTF-8, the BOM is only used
64
       to indicate data is Unicode in UTF-8 format and not to mark byte 
65
       order.]  Can not be used with the /A option (rightmost one takes
66
       precedence).  Unicode directory and file names will only be displayed
67
       correctly when using Windows NT (when Unicode Win32 APIs are available)
68
       if the corresponding name can not be converted to current ANSI charset.
69
       The DOS version does not attempt to map from extended characters
70
       properly, so results for extended ASCII (>127) characters will most
71
       likely be incorrect.  As such, the /U option may be removed from
72
       the DOS executables.
73
</pre>
74
<br />
75
<h2>Examples:</h2>
76
<p>To display the complete directory hierarchy of drive C and pause <br />
77
 after each screenful, run tree specifying C: as the start path and <br />
78
 pipe its output to the more command:<br />
79
<br />
80
<samp> tree C:\ | more </samp>
81
</p>
82
 
83
<p>When using pdTree, the above example may also be achieved using:<br />
84
<br />
85
<samp> tree C:\ /p </samp>
86
</p>
87
 
88
<p>To display the directory hierarchy of a subdirectory and have the <br />
89
 output only use standard ASCII characters (such as for printing or <br />
90
 sending to someone who may view it without DOS line/box drawing character <br />
91
 support), specify the subdirectory and the /A switch:<br />
92
<br />
93
<samp> tree <i>ASUBDIR</i> /a </samp>
94
</p>
95
 
96
<p>To display the structure of a directory tree and the files within <br />
97
 each directory, add the /F switch:<br />
98
<br />
99
<samp> tree /f | more </samp>
100
</p>
101
 
102
<p>To get a listing of all files and directories, with file sizes and attributes,<br />
103
 along with summary of how many in each directory, maintaining Unicode<br />
104
 names, and for review with a utf-8 compatible text viewer:<br />
105
<br />
106
<samp> tree /f /dh /df /da /dr /u \ > myfiles.txt </samp>
107
</p>
108
 
109
<p />
110
<hr />
111
<p />
112
 
113
<p><em>Copyright:</em> 
114
 This document is <strong>public domain</strong>, only public domain additions will be accepted. <br />
115
 Thus this document may be freely copied, etc. but no warranty, claim of correctness, 
116
 nor fitness for any purpose is given. <br />
117
 KJD 2003,2004,2005
118
</p>
119
 
120
</body>
121
</html>