Simple Zip / Unzip extension

Here is a simple extension that allows you to zip all accessible files in a folder and to unzip a ZIP file to any allowed directory (ASD, Shared Folder, PrivateDir ).

The first version is here: How do you move a directory? (How to unzip files into a specific directory) - #4 by Anke

4 Likes

Version 3:

I added new methods (ListUnzippedFiles, which returns the absolute paths, and ListUnzippedFileNames, which returns only the filenames) and the filePath parameter to the .Unzipped event.

1 Like

Hi Anke, I'm a beginner and tried using your SimpleUnzipper1 extension, roughly copying the blocks from your example. My folder "/storage/emulated/0/Documents/myFolder" only contains a .txt file; the file "myZipFile.zip" is created, but it's empty. Of course, when I try to unzip it, it doesn't produce any files. What am I doing wrong? It would be great if the zipped file could be password-protected. I've attached my blocks, thanks a lot.

Was the text file(s) in /Documents/myFolder created by your app? If so, it should work, otherwise you need SAF to access these file(s) on Android 11+.

Thanks Anke, I solved the problem by following your instructions. Is there a way to password protect a .zip file or any other file type with MIT App Inventor?