General information
Category:
Internet applications
You must Use:
Inet1.execute , "DIR /directory_name/"
and in the State_changed method of Inet1 you must use some code similar to that one:
Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim vtData As Variant
Select Case State
Case icResponseCompleted
Open "c:\valerio\test.txt" For Binary Access Write As #1
vtData = Inet1.GetChunk(1024, icString)
Do While LenB(vtData) > 0
Put #1, , vtData
vtData = Inet1.GetChunk(1024, icString)
Loop
Put #1, , vtData
Close #1
End Select
End Sub
Explanation:
The Command DIr retrieve all the listing in the directory you've selected.
The most important thing is the getChunk function that retrieve the data from the buffer. After the data was completely retrieved from the server (State = icresponseCompleted) you can easily get the data piece by piece and put where you wish (in a file or in a variable).
I hope This can Help You.
Bye, Valerio
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only