hi!
anybody who knows how to to recursively retrieve the file names found inside a particular folder?
Printable View
hi!
anybody who knows how to to recursively retrieve the file names found inside a particular folder?
Use the FindFirstFile and the FindNextFile API functions.
There is a good example on http://www.vbapi.com.
Hope that is some help.
IJ
actually i've found a way to my problem. for this piece of code to work, you must have 2 file list box on a form, called UploadedFile and CheckedFile. it will retrieve the first file from UploadedFile, process it and move it over to CheckedFile. in this way i can get hold to each of the file, one at a time. one feature that i wanted to achieve has been successful too: to add files while i'm processing a file at the same time. that's why i've the Refresh function to constantly check if there's any new file.
Private Sub Start_Click()
On Error Resume Next
UploadedFile.Refresh
UploadedFile.ListIndex = 0
While UploadedFile.ListCount > 0
'Process the first file here
FileCopy Source, Destination
Kill Source
UploadedFile.Refresh
UploadedFile.ListIndex = 0
CheckedFile.Refresh
Wend
End Sub
Yes of course, I will send you the algorithm if you want.