[delphizip] Re: Save and Exit between Compression

  • From: R Peters <rpeters@xxxxxxxxxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Wed, 15 Dec 2010 19:15:29 +1100

Externally it is the OnSetAddName event yes.
You would need to do something like this

var
  NeedToStop: Boolean;
  FilesYetToBeDone: TStringList;

procedure TForm1.ZipSetAddName(Sender: TObject; var FileName: TZMString;
  const ExtName: TZMString; var IsChanged: Boolean);
begin
   if NeedTostop then
   begin
       FilesYetToBeDone.Add(ExtName);
       FileName := ''; // tell it not to use any any name (won't save it at
all)
       IsChanged := True;
   end;
end;

When you restart (continue) you set up almost the same as initially except-
    zip.FSpecArgs.Clear;
    zip.FSpecArgsExcl.Clear;
    zip.FSpecArgs.AddStrings(FilesYetToBeDone);
    zip.AddOptions := zip.AddOptions + [AddFreshen];
Russell Peters


On Wed, Dec 15, 2010 at 6:55 PM, Allan Fernandes <
allan_fernandes@xxxxxxxxxxx> wrote:

> Hi,
>
> Sorry, I have not understood correclty.
>
> >> when you need to stop you use the AddNewName event
> I cannot find AddNewName event. If your reference is to OnSetAddName
> then that is triggered before actual compression start (correct me if I am
> wrong).
>
> >> add the name to a list of files yet to be done
> Are you refering to Zipmaster's internal list ?
>
> >> rename the file to empty string which will cause the file to be skipped
> Will I have to rename the file on Hard disk or a Zipmaster variable ?
>
> >> 2. to restart you use...
> I will not be restarting compression.
>
> Regards
> Allan
>
>
>
>
> -----------
> To unsubscribe from this list, send an empty e-mail
> message to:
>  delphizip-request@xxxxxxxxxxxxx
> and put the word unsubscribe in the subject.
>


-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: