Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get File From FTP
Message
From
15/04/1999 12:10:26
 
 
To
15/04/1999 07:28:16
General information
Forum:
Visual Basic
Category:
Internet applications
Miscellaneous
Thread ID:
00208503
Message ID:
00208598
Views:
27
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
Map
View

Click here to load this message in the networking platform