Hello all I looked at Iczelion's Tut31 (ListView) cause I need a prog that searches a specified folder for all files and list them. My problem now is that I want the program to add files that are in a subfolder, too. Can anybody show me how I can do this? I know that I have to examine the structure of the file found and look if it is a folder, but how do I get the Handle for the new folder and continue my search there until there is no other file and then return to the folder above. Any help would be really great. Stefan
Posted on 2000-11-12 08:39:00 by Stefan Krause
Hi Stefan, This question was also posted in comp.lang.asm.x86 by Remco de Lang some time ago. Take a look at this thread: /viewthread.xp?AN=683391269&search=thread&svcclass=dnyr]http://x75.deja.com//viewthread.xp?AN=683391269&search=thread&svcclass=dnyr Thomas exagone.cjb.net
Posted on 2000-11-12 08:47:00 by Thomas
Hi Thomas, to be honest. The hint with the other messageboard was not that great don't you think? All that is said there I already know. I want to know how exactly it is done, and that is not said there. I sent a mail to the guy who posted MSG 9 to ask him if he sends this proggy to me, but the other MSG's were no help. Stefan
Posted on 2000-11-12 09:43:00 by Stefan Krause
Do it recursively using the stack as variable storage (or allocate local variables yourself) the key is the variables MUST be local if you wanna recurse, unless you wanna fiddle with linked lists (which i know you dont so you may forget i mentioned them;) psuedocode: proc searchfolder pathptr:dword local path:string local currentfile:findfilestructure findfirst&findnext loop { if currentfile.filename is directory { invoke, strcpy, addr path, pathptr invoke, strcat, addr path, currentfile.filename invoke, searchfolder, addr path ;search subfolder } if current.filename math criteria { ; do your stuff } } endp searchfolder hope this helps, prolly not, but maybe ;)
Posted on 2000-11-13 09:37:00 by Zynaps