Mail Archives: djgpp/2000/05/19/08:31:01
> 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 -