Date: Fri, 19 May 2000 08:29:38 -0400 (EDT) Message-Id: <200005191229.IAA23656@indy.delorie.com> From: Eli Zaretskii 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: <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 Precedence: bulk > From: Krogg > 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.