Hi all. I made a small app that looks for all the jpgs in a directory and assigns them to a strArray by pathname. The code I found here on the forum looks like this:

***************************************************
Sub p_List_Directories(str_Path As String)
'PURPOSE: Add Back Slash
If Right(str_Path, 1) <> "\" Then str_Path = str_Path & "\"

'PURPOSE: Get the first file
str_Path = Dir(str_Path & "*.*")
Do Until str_Path = ""

'PURPOSE: Add it to the Listbox
strPath3 = StrConv(str_Path, vbProperCase)
If Right$(strPath3, 3) = "jpg" Then List1.AddItem strPath3

'PURPOSE: Get the next file
str_Path = Dir()
Loop


intNumFiles = List1.ListCount
For intNum = 0 To intNumFiles
strFile(intNum) = List1.List(intNum)
Next intNum
*****************************************************

Okay, the question is, how can i change this code so that it goes on to find all the jpgs in all the subdirectory folders inside this folder and also adds them to the strArray.

If anybody knows, I would really appreciate if you could let me in on it.

Thanks a lot.

Wengang