Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get File From FTP
Message
De
15/04/1999 12:10:26
 
 
À
15/04/1999 07:28:16
Information générale
Forum:
Visual Basic
Catégorie:
Applications Internet
Divers
Thread ID:
00208503
Message ID:
00208598
Vues:
26
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform