delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/19/03:00:45

From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Directory listing
Date: Fri, 19 May 2000 10:45:55 +0400
Organization: MTU-Intel ISP
Lines: 42
Message-ID: <3924E323.583CAC90@mtu-net.ru>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000518115130 DOT 12245T-100000 AT is> <3924B7F6 DOT 28989BA7 AT gtcom DOT net>
NNTP-Posting-Host: ppp108-3.dialup.mtu-net.ru
Mime-Version: 1.0
X-Trace: gavrilo.mtu.ru 958718796 41367 212.188.108.3 (19 May 2000 06:46:36 GMT)
X-Complaints-To: usenet-abuse AT mtu DOT ru
NNTP-Posting-Date: 19 May 2000 06:46:36 GMT
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: ru,en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Directories have a special bit in the attribute byte. You may skip all the
files/dirs checking that byte (Take a look at DOS.H -- findfirst() --
FA_DIREC).

bye.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror:   http://members.xoom.com/alexfru

Krogg wrote:
> 
> 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.But lets say i uses "*.*" and
> filtered the list with fnmatch....
> 
> How do i filter subdirectories from the list?
> I cant look for ones without dots in the name,cause there
> may be some files without dots and it would not catch
> "." and ".."
> 
> IS there a good way to get a list of subdirectories
> in the current directory?
> 
> 
> 
> --
> Krogg

- Raw text -


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