Directory/File Listing Problem
Hello,
I was asked by a friend to make a prog that will create an html file with a directory/file listing every X seconds, I used the following code and it works fine if there's only one more level under the dir but if a sub dir has a sub dir it doesn't list it, any help would be greatfully apriciated
Code:
Text1.Text = "<html><title>Download Reporter</title><body>"
For i = Dir1.ListIndex To Dir1.ListCount - 1
sFile = Dir$(Dir1.List(i) & "\*.*")
Text1.Text = Text1.Text & Dir1.List(i) & ": <br>"
Do While sFile <> ""
Text1.Text = Text1.Text & "<li>" & sFile & "</li><br>"
sFile = Dir$
Loop
Text1.Text = Text1.Text & "<br>"
Next i
Open Text2.Text For Output As #1
Print #1, Text1.Text
Print #1, "<br><br><small>Created on: " & Date & " at: " & Time & "</body></html>"
Close #1
Thanks in advance!