From: Goh Yong Kwang Newsgroups: comp.os.msdos.djgpp Subject: Re: readdir question Date: Sat, 15 Aug 1998 10:15:00 +0800 Organization: Ngee Ann Polytechnic, Singapore Lines: 49 Message-ID: References: <000401bdc3bd$8ec5b9c0$0b1f1bc4 AT enterprise-z> NNTP-Posting-Host: mercury.np.ac.sg Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII NNTP-Posting-User: s6606555 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit Precedence: bulk In-Reply-To: <000401bdc3bd$8ec5b9c0$0b1f1bc4 AT enterprise-z> I think there's a function called Traverse or something. It helps you to traverse a directory tree. It may help. Use info to find out how to use it. I personally have not used it before. ---------------------------------- Many regards, Goh Yong Kwang 96606555 3K ---------------------------------- On Sun, 9 Aug 1998, =?iso-8859-1?Q?Jorge_Iv=E1n_Meza_Mart=EDnez?= wrote: > Hi, > > I have to read the file names from certain directory, I am using: > > |#include > |struct dirent *readdir(DIR *dir); > | > |DIR *d = opendir( argv[1] ); > | > |while ((de = readdir(d))) > | cout >> de->d_name; > | > |closedir ( d ); > > but it does not read from other subdirectories, just the directory that I > tell him and not its subdirectories. > > from the "LibC Reference" I understood that setting "__opendir_flags" > variable to "__OPENDIR_FIND_HIDDEN", the "opendir ( ... )" would seek for > files thru subdirectories, I added to my program: > > extern int __opendir_flags; > __opendir_flags = __OPENDIR_FIND_HIDDEN; > > but nothing changes, all is the same than before. > > can you help me please ? > > Jorge Iván Meza Martínez > jimeza AT usa DOT net > http://members.xoom.com/THP > > > >