-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathLDIR30.DOC
145 lines (100 loc) · 4.78 KB
/
LDIR30.DOC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
LDIR Command
-----------
Purpose: To display the files in one or all directories of a disk.
Format: LDIR [d:][\path]filespec] [/?... /?]
Remarks: If no operands are supplied, the files in the current path
and in the current directory are displayed. You may specify
another drive using the d: operand, and/or a path name,
and/or a file specification. Wildcard characters * and ? are
permitted in the filespec operand.
All available memory is used. As many files as fit in memory
are sorted and displayed.
The /? refers to optional processing switches. You may use
one or more of the following:
Sort options:
/D sort by file Date
/F sort by File name
/N no sorting of DIR entries
/S sort by file Size
/X sort by eXtension
File criteria:
/A include Attributes, e.g. S=system, R=readonly, H=hidden
/H include files with the Hidden attribute
/M display only Modified files, i.e with Archive bit off
/P include all Paths starting with the current directory
Display options:
/C Clear screen first, and after any "... more" prompts
/W Wait after screen full, ask for any key after 20 lines displayed
/? display usage syntax
Examples:
- Display all files, in filename order, on the current drive:
LDIR
- Display all files in the subdirectory \TEST\PGMS on drive B:
LDIR B:\TEST\PGMS
- Display only those files with an extension of .COM in the
current directory which is not a root directory:
LDIR \*.COM
- Display all modified files in all subdirectories on current drive
and place the output in the file called DIRLIST on drive C:
LDIR /M/P >C:DIRLIST
-
Changing defaults:
The default option is to sort by file name. You may use DEBUG
to permanently change this default. The bytes called FLAG1
and FLAG2 contain the option indicators.
Field Offset Option Hex and bit values
----- ------ ------ -----------------------------------
FLAG1 010D A 01 .... ...1
H 02 .... ..1.
C 04 .... .1..
D 08 .... 1...
X 10 ...1 ....
F 40 .1.. ....
S 80 1... ....
FLAG2 010E M 01 .... ...1
W 02 .... ..1.
P 20 ..1. ....
For example, to change to defaults to /A/P/D/F/W:
FLAG1 becomes 01 + 08 + 40, (A and D and F),
FLAG2 becomes 02 + 20 = 22, (W and P).
DEBUG LDIR.COM
-e 10d 49 (should originally be 40)
-e 10e 22 (should originally be 00)
-w
-q
Notes: Written for the IBM PC using DOS 2.0 or later, including DOS 3.1.
For public domain use. Not for sale or hire.
Copyright 1986 by Vernon D. Buerg. All rights reserved.
456 Lakeshire Drive
Daly City, CA 94015
BBS: (415) 994-2944
CompuServe: 70007,1212
-
Version history:
Version 2.3, August 10, 1985
Correct some problems with path\filespec syntax
Adds /M option to list modified files only
Version 2.4, October 28, 1985
Adds /W option to pause after 20 lines are displayed
Speeds up screen displays but defeats redirection
Version 2.5, November 5, 1985
Minor changes for color displays
Version 2.6, January 4, 1986
By popular demand, ability for redirection and
use of PrtSc restored at the price of slower displays.
Problem changing current directory fixed.
Version 2.7, February 15, 1986
Minor corrections to command line syntax checking
Version 2.8, April 22, 1986
A special request version that does NO sorting of
the directory entries. The directory is displayed
in its original order. This is now the /N option.
Version 2.9, May 12, 1986
Corrects problem changing the current directory of
the current drive when LDIR is used for a subdir on
another drive.
| Version 3.0, June 4, 1986
| Corrects a problem when DEBUG is used to change
| the default option switches. The attribute mask
| used to read directories was not being updated.