ABUnzip doesn't work!

cirollo

Active Member
Licensed User
Longtime User
Hi everybody!
I'm trying to do this:
B4X:
Sub Globals
   'These global variables will be redeclared each time the activity is created.
   'These variables can only be accessed from this module.
    Dim FTP As FTP
   Dim BtInvia As Button
   Dim BtRicevi As Button
   Dim EditText1 As EditText
   Dim sdRoot As String
   sdRoot = Main.sdRoot (it comes from the main activity module: sdRoot = File.DirRootExternal & "/")
   Dim Nfile As String
   NFile = "1.zip"
End Sub

Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("Sync")
    If FirstTime Then
          FTP.Initialize("FTP", "192.168.1.91", 21, "emmeci", "emmeci")
   End If
End Sub

Sub BtRicevi_Click
   Dim myZip As ABZipUnzip
   Msgbox("download started","ready!")
   File.MakeDir(sdRoot, "mcordini")
   File.Delete(sdRoot,NFile)
   FTP.List("/")
   FTP.DownloadFile(NFile, False, sdRoot, NFile)
   myZip.ABUnzip(sdRoot & NFile, sdRoot & "mcordini")
End Sub
the file 1.zip was correctly downloaded but not unzipped and no error was shown! It contains 2 files, but I wasn't able to unzip them in my folder.
why????

thanks for the help!
regards, cirollo
 
Last edited by a moderator:

cirollo

Active Member
Licensed User
Longtime User
no unzip at all

ok Erel, following your suggestions now I have:

Sub FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = True Then
Msgbox("ccc","xxx")
Dim myZip As ABZipUnzip
myZip.ABUnzip(sdRoot & NFile, sdRoot)
End If
End Sub

but no unzip at all!!!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…