Dec 282017
LDIR v4.4 directory lister from Vern Buerg.
File LDIR44.ZIP from The Programmer’s Corner in
Category File Managers
LDIR v4.4 directory lister from Vern Buerg.
File Name File Size Zip Size Zip Type
LDIR.ASM 33113 10026 deflated
LDIR.COM 3363 2384 deflated
LDIR.DOC 5163 2097 deflated

Download File LDIR44.ZIP Here

Contents of the LDIR.DOC file

LDIR Command Version 4.4
----------- Mar 25, 1991

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

LDIR Command Version 4.4
----------- Mar 25, 1991


o Display all files, in filename order, on the current drive:


o Display all files in the subdirectory \TEST\PGMS on drive B:


o Display only those files with an extension of .COM in the
current directory which is not a root directory:


o Display all modified files in all subdirectories on current drive
and place the output in the file called DIRLIST on drive C:


LDIR Command Version 4.4
----------- Mar 25, 1991

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.

FieldOffsetOptionHex and bit values
FLAG10111 A01 .... ...1
H02 .... ..1.
C04 .... .1..
D08 .... 1...
X10 ...1 ....
F40 .1.. ....
S80 1... ....

FLAG20112 M01 .... ...1
W02 .... ..1.
P20 ..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).

-e 10d 49 (should originally be 40)
-e 10e 22 (should originally be 00)


Written for the IBM PC using DOS 2.0 or later, including DOS 3.3.

For private use only. May not be sold.

Copyright 1986-89 by Vernon D. Buerg. All rights reserved.

139 White Oak Circle
Petaluma, CA 94952
BBS: (707) 778-8944
CompuServe: 70007,1212

LDIR Command Version 4.4
----------- Mar 25, 1991

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.

Version 3.1, Dec 28, 1986
Version 3.2, June 12, 1987
Corrects problem specifying a filespec when in a
subdirectory, e.g. LDIR *.ASM failed.

Version 4.1, Jan 25, 1989
Expands the number of file names from 1000 to an amount
determined by available memory. Approximately 64 bytes
per file name is required. In other words, 64K bytes of
memory is required for each 1000 files.

Version 4.3, Dec 14, 1989
Change display of bytes used and free to allow values
over 100 million; add commas. Also correct failure to
clear the screen if the /C option is set by DEBUG.

Version 4.4, Mar 25, 1991
Correct handling of /N no sort option when /A or /H
is also specified.

 December 28, 2017  Add comments

Leave a Reply