Android Question Zipping files and folders from a directory

aironium

Member
Anyone knows how to zip files and folders in B4A?

lets say we have this file tree:

? master/
⬜? fish.jpg
⬜? fish2.jpg
⬜? shrimp/
⬜⬜?prawns/
⬜⬜⬜? fried.mp3
⬜⬜? cocktail/
⬜⬜⬜? fruits.png


I have used Archiver. However, when zipping it, it wraps the whole "master" folder, however my goal is to zip what is inside the "master" folder.

I also tried ArchiverPlus, tried AddFolderToZip method but yields the same result. I tried zipping them recursively, swapping folder and file methods from archiverplus, but messed it up. Any suggestions?
 

aironium

Member
Alrighty, I got it now, somewhat. Turns out, a simple condition checking the file list between folders and files, without recursion works fine.

Still have some missing RaiseSynchronousEvents for archiver's addFileToZip even if there are subroutines defined already.
 
Upvote 0
Top