🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9103

Re: Find a file in one of subdirectories

#9103
From: Saulo I. Regis
Date: Mon, 02 Aug 2004 13:42
27 lines
1817 bytes
"Mauro" <Mauro23@gmx.de> escreveu na mensagem
news:410e3fb2$1@newsgroups.borland.com...
> But what the hell should I do when I have 50 subdirectories
> (no further subdirectories are included) in the current
> directory. Is there no easy possibility to do that??

Hi Mauro,

You'll just need to create a recursive function that receives a directory
path to explore and in a simple loop

it steps thru each item in this directory (use the FindNext() function for
it)

it checks if that item is a sub-dir
   in case positive it re-calls itself passing this sub-dir as parameter

You start everything calling that recursive function with the "root"
directory to explore as the parameter.

HTH,

Saulo I. Regis
Password Informatica Ltda

 http://www.pictureprogressbar.com
 Picture ProgressBar - The Evolution of the Progress Bar
Technical Details
Message-ID: <410e44fc@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <410e3fb2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,de3e19de7f81211c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Saulo I. Regis" <saulo@password.info>
From: "Saulo I. Regis" <saulo@password.info>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <410e3fb2$1@newsgroups.borland.com>
Subject: Re: Find a file in one of subdirectories
Date: Mon, 2 Aug 2004 10:42:18 -0300
Lines: 29
Organization: Password Informatica Ltda
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 200.215.24.7
Message-ID: <410e44fc@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1091454204 200.215.24.7 (2 Aug 2004 06:43:24 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail