delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/16/04:15:56

Date: Thu, 16 Aug 2001 10:14:40 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <3791-Thu16Aug2001101439+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
In-reply-to: <3B7B46DB.FBE09F88@hotmail.nospam.com> (message from Ian Rees on
Thu, 16 Aug 2001 00:06:51 -0400)
Subject: Re: Getting files in directory
References: <3B7B46DB DOT FBE09F88 AT hotmail DOT nospam DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Ian Rees <ianr44 AT hotmail DOT nospam DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Thu, 16 Aug 2001 00:06:51 -0400
> 
>      I am working on writing a progam that needs to be able to open and
> save files.  For the UI, I would like to be able to show all the files
> in the current directory.  Could somebody please explain how to get a
> list of files in a directory?  I am running DJGPP 2.03 on an Athlon 1000
> w/Win98 (I would like the program to be able to run in Win95,Win98, and
> plain DOS [NOT DOS box]) Thanks in advance!

If you only need to run the program on DOS and Windows, use the
library functions findfirst and findnext.  If you want portability to
Unix and GNU/Linux systems, use opendir and readdir.  They are all
documented in the library reference manual.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019