Will try to check but if have you tried the OnSetNewName if you want it to save the file under different name? Russell Peters http://www.users.bigpond.com/russellpeters/delphizip.html ----- Original Message ----- From: "Barmaleo" <barmaleo@xxxxxxx> To: "Roger Aelbrecht" <delphizip@xxxxxxxxxxxxx> Sent: Thursday, January 02, 2003 1:59 AM Subject: [delphizip] Re: Choosing destination filenames > > Hello Roger, > > Wednesday, January 1, 2003, 3:47:43 PM, you wrote: > RA> I am not sure what you are referring to but in > RA> AddStreamToFile "Fielname" is the name that the file will > RA> have inside the archive. The archive name is the name you > RA> gave in ZipFileName. Since data is in a stram there is no > RA> 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. > > RA> If you have the data in a file it is not a good idea to use > RA> streams, > > Thanks Russell, I don't need it more. :) I was just looking for a > way of naming files. > > > -- > Happy new year! :) > Barmaleo > > >