PDA

View Full Version : how to have a progression show while adding files to a zip archive ?


cgirolet
04-21-2007, 04:08 PM
i would like to know if there is a way to show some kind of progress bar or a percentage of completion, when adding files to a zip archive ? I managed to add a function that show a timed message before adding files and another when it's finished, that' all !

my users will add files to a listbox before making a zip file, so i don't know in advance how many they'll add.

Of course, i could count files in the listbox, but even if i make a kinda loop how will i know wich file is currently zipped.

thanks in advance (again !)

claude

bobbie
04-21-2007, 11:24 PM
-- Show the status dialog.
StatusDlg.Show();
-- Extract the contents of the Zip file.
Zip.Extract("AutoPlay\\Docs\\Info.zip", {"*.*"}, target_folder, true, true, "", ZIP_OVERWRITE_NEVER, nil);

-- Check the error code for the last action.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();