|
-
May 4th, 2000, 03:54 PM
#1
Thread Starter
Junior Member
well, found out the main problem in my program, lies within this code.
counter = 0
hFile = FindFirstFile(strCurrentDir, WFD)
If hFile = -1 Then
hFile FindClose(hFile)
Exit Sub
End If
Do
If (WFD.dwFileAttributes And FILE_ATTRIBUTE_DIRECTORY) Then
sTmp = TrimNull(WFD.cFileName)
If sTmp <> "." And sTmp <> ".." Then
counter = counter + 1
strFolderName(counter) = sTmp
blnResults = True
End If
End If
Loop While FindNextFile(hFile, WFD) 'this is the line it bombs out in
'close the find handle
hFile = FindClose(hFile)
better explain.
I want to list in the array STRFOLDERNAME, all sub-folders within a predetermined Results folder. This works ok, however, if any other files are present within this directory (apart from a txt file) the system total crashes out and throws up a lot of errors through Dr. Watson.
Can anyone please tell me what I am doing wrong here.
Please, why is this not working
many thanks
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
|