home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!rutgers!flop.ENGR.ORST.EDU!leela.CS.ORST.EDU!atlantis.CS.ORST.EDU!omarab
- From: omarab@atlantis.CS.ORST.EDU (Scorpion)
- Newsgroups: comp.lang.c
- Subject: Re: Directory search function needed
- Message-ID: <1i2hiqINNp65@leela.CS.ORST.EDU>
- Date: 1 Jan 93 22:45:46 GMT
- References: <8829@orbit.cts.com>
- Organization: OSU CS Outreach Services, Corvallis, Oregon
- Lines: 37
- NNTP-Posting-Host: atlantis.cs.orst.edu
-
- OK.... I had been interested in such a file search program too.... This
- example is found in the THELP program which is supplied with Turbo C:
-
- #include "c:\borland\include\dir.h"
- #include "c:\borland\include\stdio.h"
-
- void main()
- {
- struct ffblk ffblk;
- int done;
-
- done = findfirst("*.*", &ffblk, 0);
- while(!done)
- {
- printf("%s\n", ffblk.ff_name);
- done = findnext(&ffblk);
- }
- }
-
- That should do it for ya dude.... the findfirst command is the one you will
- use... allong with the findnext command. Hope that helps ya out....
-
- -----------------------------------------------------------------------------
- Brendan O'Mara Owner, Stealth Technologies,
- Email: omarab@jacobs.ucs.orst.edu specializing in:
- Alias: Scorpion
- Phone: (503)745-7549 Programming
- Computer Lessons
- Sysop of the Stealth BBS: Computer Setup Assistance
- (503)745-7549, 9pm-7am weekdays,
- 24 hours most weekends. Call for details!
- ------------------------------------------------------------------------------
- --
- -----------------------------------------------------------------------------
- Brendan O'Mara Owner, Stealth Technologies,
- Email: omarab@jacobs.ucs.orst.edu specializing in:
- Alias: Scorpion
-