Hi,
I am using the ArchiverPlusZip Library in my B4J project with success (thank you, Frédéric) most of the time, but sometimes an Arc.AddFileToZip just does not add the file to the zip.
There are normally 8-12 image files of various length (in a for...next loop) that have to be added which could be in any of 3 directories like this
And it is never the same 2 or 3 files that are skipped.
I've read somewhere that you'd have to put it in a SUB, but can't remember where I saw this, can't figure out how and could not find an amateur-friendly example.
Can anyone please help me resolve my dilemma?
Thank you very much in advance,
john m.
I am using the ArchiverPlusZip Library in my B4J project with success (thank you, Frédéric) most of the time, but sometimes an Arc.AddFileToZip just does not add the file to the zip.
There are normally 8-12 image files of various length (in a for...next loop) that have to be added which could be in any of 3 directories like this
B4X:
Dim ArchiveFolder As String = Q.lastFolder&"\"&zipname
Arc.ZipExecutionMode = Arc.ZIP_EXECMODE_ASYNCHRONOUS
Arc.ZipCompression = True
Arc.ZipCompressionLevel = 8 'tried with level 4: no difference
for ...
...else if File.Exists(Q.lastFolder,B) Then
Log("3 zip adding image "&B&" from "& Q.lastFolder) 'where B is the file name
Arc.AddFileToZip(Q.lastFolder&"\"&B,ArchiveFolder,"Archiver")
End If
Do While Arc.ZipResultCode = Arc.ZIP_RESULT_WORKING
Sleep(0) 'as found in your sample code - tried without sleep and with sleep(500): no difference
loop
next
Loop
And it is never the same 2 or 3 files that are skipped.
I've read somewhere that you'd have to put it in a SUB, but can't remember where I saw this, can't figure out how and could not find an amateur-friendly example.
Can anyone please help me resolve my dilemma?
Thank you very much in advance,
john m.