|
-
Aug 13th, 2001, 05:32 AM
#1
Thread Starter
New Member
API function for recursive search
Hi, is there any API function that can perform recursive search in filesystem. Just similar to the command "Dir xxx.exe /s"
Thx a lot
-
Aug 13th, 2001, 06:10 AM
#2
Use FindFistFile to begin the search and FindNextFile to continue it.
-
Aug 13th, 2001, 07:17 AM
#3
Thread Starter
New Member
Hi Megatron, I have tried to use this API function, but I find that it doesn't support, or it is needed to implement the recursively search for each sub-directories by myself, I wonder if there is any easier method to handle it.
Thanks for you help
-
Aug 15th, 2001, 05:46 PM
#4
Fanatic Member
You have to set up the recursion part yourself. When you get a file out of FindFirstFile()/FindNextFile(), you need to determine if it's a file or dir, and if it's a dir, add it to an array or something, and keep getting the rest of the things in the dir. Then you have to step into each of the saved dirs and repeat the whole process. It can be a lot to handle . There is an example of this at www.allapi.net in the API-List part under those functions if you want to take a look. There are ways to do this with Dir$() as well I believe, but they are extremely slow compared to using the APIs.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Aug 16th, 2001, 01:45 AM
#5
Registered User
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|