Path: utzoo!attcan!lsuc!ncrcan!hcr!mnarayan From: mnarayan@hcr.UUCP (Michael Narayan) Newsgroups: comp.lang.c Subject: Re: Where oh where is my directory Message-ID: <204@hcr.UUCP> Date: 8 Apr 89 01:15:35 GMT References: <18924@iuvax.cs.indiana.edu> Reply-To: mnarayan@hcrvx1.UUCP (Michael Narayan) Distribution: na Organization: HCR Corporation, Toronto Lines: 23 perrone@loligo.UUCP (Perrone Ford) <7712@pyr.gatech.EDU> : >What I am trying to accompish is to read the directory >entries into a buffer and then print the buffer out in the >middle of a graphics routine > > [stuff deleted] Since you now know that system("dir") will not work, here is how you can do what you want. TurboC (and Microsoft C I believe) provide two routines called findfirst() and findnext() which allow you to retrieve the entries in a directory given a pattern (* and ? wildcards allowed). You can use these two functions to retrieve the directory entries you want into a buffer, which you can later print out. --------------------------------------------------------------- Michael J. Narayan HCR Corp. {utcsri!utzoo}!hcr!mnarayan Nobody else could have opinions like these. I'm just the co-op (slave labour) --------------------------------------------------------------- HCR Corp.