Date: Wed, 04 Dec 2002 18:31:03 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <2110-Wed04Dec2002183102+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: lscholta AT gmx DOT de In-reply-to: <28777.1038993684@www18.gmx.net> (lscholta@gmx.de) Subject: Re: problems with findfirst References: <28777 DOT 1038993684 AT www18 DOT gmx 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 > Date: Wed, 4 Dec 2002 10:21:24 +0100 (MET) > From: lscholta AT gmx DOT de > > I have a problem with "findfirst": I have written a program which is > searching for *.c files in the current directory and in subdirectories. Although i > have add "FA_DIREC",it works only in the current directory but files in > subdirectories were not found. Where is the problem? As already explained here, `findfirst' only finds files in the current directory. To find files in subdirectories, you need to chdir to each subdirectory found by `findfirst' and repeat the loop there. DJGPP has a library function that will do most of the work for you, it's called `__file_tree_walk'. Look up its documentation in the library reference manual.