[delphizip] Re: Choosing destination filenames

  • From: "Russell Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Thu, 2 Jan 2003 07:10:26 +1100

Will try to check it but am still not working well yet (must  eventually get
through it)
- Russell
----- Original Message -----
From: "Roger Aelbrecht" <Roger.Aelbrecht@xxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Thursday, January 02, 2003 5:07 AM
Subject: [delphizip] Re: Choosing destination filenames


>
> Roger Aelbrecht wrote:
> > Barmaleo wrote:
> >> Hello Roger,
> >>
> >> Wednesday, January 1, 2003, 3:47:43 PM, you wrote:
> >>> I   am   not   sure   what   you  are  referring  to  but  in
> >>> AddStreamToFile  "Fielname"  is  the  name that the file will
> >>> have  inside  the  archive.  The archive name is the name you
> >>> gave  in  ZipFileName.  Since  data is in a stram there is no
> >>> source to refer to.
> >>
> >> I use ZipMaster 1.70.
> >> Look:
> >>
> >> -----------------------------------------------------------------
> >>  Example code
> >> -----------------------------------------------------------------
> >>
> >> procedure TMainForm.SpeedButton1Click(Sender: TObject);
> >> var
> >>   ZipMaster : TZipMaster;
> >> const
> >>   sPath = 'P:\Delphi Unit Tests\ZipMstr\';
> >> begin
> >>   ZipMaster := TZipMaster.Create(nil);
> >>
> >>   ZipMaster.ZipFileName := sPath+'test-1.zip';
> >>   ZipMaster.ZipStream.LoadFromFile(sPath+'uMainForm.pas');
> >>   ZipMaster.AddStreamToFile('Absolutely New Name.pas');
> >>
> >>   ZipMaster.Free();
> >> end;
> >>
> >> -----------------------------------------------------------------
> >>
> >> It  doesn't add anything to test-1.zip. OnMessage handler returns
> >> the followng message:
> >>   'File specification "P:\Delphi Unit Tests\ZipMstr\Absolutely
> >>    New Name.pas" skipped'.
> >>
> >> But   I  didn't  mention  such  file,  moreover  "P:\Delphi  Unit
> >> Tests\ZipMstr\Absolutely  New  Name.pas" doesn't exist. Because I
> >> just  wanted  to give local in-zip name for real file, that named
> >> 'uMainForm'.
> >>
> >> When method called that way:
> >>   ZipMaster.AddStreamToFile(sPath+'uMainForm.pas');
> >> everything works.
> >>
> >>> If  you  have the data in a file it is not a good idea to use
> >>> streams,
> >>
> >> Thanks Russell, I don't need it more. :) I was just looking for a
> >> way of naming files.
> >
> > Will do some investigating, thanks for the extra info
> >
> >
> > Roger Aelbrecht
> > http://web.wanadoo.be/driehoeksw
>
> The above needs investigation by a ZipMaster user who can do
> some debugging. Can't find anything wrong with ZipBuilder, sorry
>
> Roger Aelbrecht
> http://web.wanadoo.be/driehoeksw
>
>



Other related posts: