B4J Question Archiver

ThRuST

Well-Known Member
Licensed User
Longtime User
I want to create a zipfile from a couple of specific files in a directory can anyone assist in how to do this with Archiver? Thanks
 
Use the forumsearch for an Example
Note that the library is an Android Library. You may search the B4A Forums too
 
Upvote 0
Thanks, but I did not find any. Do you mind forward me with a link to a solution to my question?
 
Upvote 0
Like this?

Code:
Dim Zip As Archiver
Dim toZip() As String 'This array will contain all the files you want to zip

toZip = Array As String("File1.txt", "File2.txt", "File3.txt")
Zip.AsyncZipFiles(File.DirDefaultExternal & "/SomeDirectory/", toZip, File.DirDefaultExternal, "MyZipFile.zip", "Zip")




Sub Zip_ZipDone(Success As Boolean, FilesInZip As Int)
    ToastMessageShow(Success & "  " & FilesInZip, False)
End Sub
 
Upvote 0
Strange, I could not get the code to work properly. The zip archieve does not contain the files I specified. Can someone please test this and confirm that it works?
 
Upvote 0
Oops ok sorry I got it working. The path to the source directory was not right. All my own misstake.
 
Upvote 0
Back
Top