Utilisation de FTP

sultan87

Active Member
Licensed User
Longtime User
Bonjour
Je serais désireux de récupérer une base de données SQLITE stockée sur le site FTP de FREE
Pouvez vous me donner un exemple complet
Comment faire pour recopier cette base de données sur le site ftp après utilisation sur le téléphone mobile
Cordialement
 

sultan87

Active Member
Licensed User
Longtime User
Utiliser FTP

Merci
j'ai suivi le tutorial
j'ai fait FTP.Initialize("FTP", "ftpperso.free.fr", 21, "xxxx", "yyy")
mais comment utiliser le sub
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
comment faut il l'appeller
et que mettre dans les parametres
Cordialement
 
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
Ok j'ai trouvé FTP.list ("/")
e
mode Debug il appelle bien FTP_ListCompleted
Success est True
mais Folders est vide
en regardant sur le site free il y a bien des folders
Cordialement
 
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
onjour
j'ai essayé sans succés
voila la connexion sur mon site ftp
FTP.Initialize("FTP", "ftpperso.free.fr",21 , "pmc.ftp", "soline")
FTP.List ("/") ou FTP.List ("/Gestion des caves")
sans succés
Cordialement

pourriez vous faire l'essai et me dire ce que vous en pensez?
 
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
Hi
i have tested without success
here is connection on my site ftp
FTP.Initialize (" FTP" , " ftpperso.free.fr" , 21, " pmc.ftp" , " soline")
FTP.List (" /") or FTP.List (" /Gestion of the caves") without success
could you make l' test and to say to me what you think?
Cordially
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've tried the following code and it works:
B4X:
'Activity module
Sub Process_Globals
   Dim FTP As FTP
End Sub

Sub Globals

End Sub

Sub Activity_Create(FirstTime As Boolean)
   If FirstTime Then
      FTP.Initialize("ftp", "ftpperso.free.fr", 21, "pmc.ftp", "soline")
   End If
   FTP.List("/")
End Sub
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
   If Success == False Then
      Log(LastException.Message)
   Else
      For i = 0 To Files.Length - 1
         Log(Files(i).Name)
      Next
      For i = 0 To Folders.Length - 1
         Log(Folders(i).Name)
      Next
   End If
End Sub

It prints to the logs:
SS-2011-10-10_14.59.57.png
 
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
hello
what you have fact is correct
I have just made exactly the same program and it m' post that the first 2 lines in the log
** Activity
I do not include/understand
cordially
 
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
Hello j' use l' emulator (run avd to manage - virtual device) j' added the line FTP.PassiveMode = True after the line FTP.Initialize (" ftp" , " ftpperso.free.fr" , 21, " pmc.ftp" , " soline") even problem quid cordially
 
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
Ok j' found your tuto to use a real device j' installed B4ABridge on my telephone j' have chooses Tools B4A Bridge Connect j' have run l' appli I n' still do not have the list in the logs
best regards
 
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
Ok j' found your tuto to use a real device j' installed B4ABridge on my telephone j' have chooses Tools B4A Bridge Connect j' have run l' appli I n' still do not have the list in the logs
best regards
 
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
I have just carried out a test with 2 buttons short prop 1 and short prop 2 with posting d' a message if one clicks on l' one of the buttons in mode real device no the problem but the list s' still do not post in the logs
 
Upvote 0
Top