[Gambas-user] Help for observ one process...

T Lee Davidson t.lee.davidson at gmail.com
Thu May 18 14:54:10 CEST 2023


On 5/18/23 04:18, Fabien TONIUTTI wrote:
> Hi,
> A gambas Zip front end project.
> 
> In one zip file, i have 150 files and folders.
> I make a zip front end in gambas.
> When i click on my button 'Expand', i need to know how many file are uncompressed and how many file stay to uncompress with a 
> progressbar.
>   how i could have a progress bar who increase with number of file uncompressed during my process :
> 
>   Exec["unzip",$file]
> 
>   Thanks for your answer.

To track the unzip progress, you would probably need to use `unzip -l` first to get the total size of all files. And then do the 
actual decompression verbosely with `unzip -v` in a Process so you can read the output in the Process' Read event. Provided the 
data you need is provided by `unzip`, this would allow you to calculate the progress as each file is processed.

Take a look at the manual page for "unzip" and possibly "zipinfo" as well; and also https://gambaswiki.org/wiki/comp/gb/process.


-- 
Lee



More information about the User mailing list