delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/19/08:31:01

Date: Fri, 19 May 2000 08:29:38 -0400 (EDT)
Message-Id: <200005191229.IAA23656@indy.delorie.com>
From: Eli Zaretskii <eliz AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <3924B7F6.28989BA7@gtcom.net> (message from Krogg on Thu, 18 May
2000 23:41:42 -0400)
Subject: Re: Directory listing
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000518115130 DOT 12245T-100000 AT is> <3924B7F6 DOT 28989BA7 AT gtcom DOT net>
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: Krogg <krogg DOT no DOT to DOT spam AT gtcom DOT net>
> Newsgroups: comp.os.msdos.djgpp
> Date: Thu, 18 May 2000 23:41:42 -0400
> 
> Eli Zaretskii wrote:
> > 
> > On Wed, 17 May 2000, Krogg wrote:
> > 
> > > What i want in the listing is all files that match "*.c"
> > > and the names of the subdirectories....
> > >
> > > here is my sample code...how can i change it to
> > > print out the subdirectories and the "*.c" files?
> > 
> > Pass "*.*" to findfirst, then use the fnmatch function to filter the
> > files which match the "*.c" pattern.
> 
> I can just use "*.c" in the findfirst function and
> get the same result.

This won't get you the subdirectories.  I thought your problem was to
get *.c files *and* subdirectories, no?

> How do i filter subdirectories from the list?

They have a special attribute bit set in the ff_attrib member of
struct ffblk.

- Raw text -


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