[net.micro] Need to read directories in MSDOS

stanwyck@druxu.UUCP (StanwyckDA) (12/11/85)

HELP!  I am trying to find a way to write a utility for PC6300 (and compatibles)
running MS-DOS.  The utility requires that it be able to read and search
directories.

I am trying to write the utility in Microsoft C, but have not been able to find
any way to open a directory for reading, or to cause the system to return to
me the contents of a directory.

Does anyone have any pointers on what to do?  Any leads would be appriciated.

Thanx!!
-- 
 ________
 (      )					Don Stanwyck
@( o  o )@					303-538-5004
 (  ||  )					Cornet-374-5004
 ( \__/ )					[druxu|drutx]!stanwyck
 (______)					AT&T-IS @ Denver, CO

johnl@ima.UUCP (12/13/85)

/* Written  2:41 pm  Dec 11, 1985 by stanwyck@druxu in ima:net.micro */
> HELP!  I am trying to find a way to write a utility for PC6300 (and
> compatibles) running MS-DOS.  The utility requires that it be able to read
> and search directories.
>
> I am trying to write the utility in Microsoft C, but have not been able to
> find any way to open a directory for reading, or to cause the system to
> return to me the contents of a directory.

Use the DOS "find first" and "find next" calls, numbers 4E and 4F.  They do
filename pattern matching and if your pattern is, say, \foo\*.* you get all
of the files in directory foo.  It returns the time, date, and size of the
file along with the name so you get pretty much everything you'd get from
reading the directory yourself, but is much, much, easier.

John Levine, ima!johnl