| View previous topic :: View next topic |
| Author |
Message |
Erik Bellaard Guest
|
Posted: Mon Jul 25, 2005 7:03 pm Post subject: Zipforge problem |
|
|
Hi,
I am using ther zipforge component and I am having a little problem:
I have the following code:
with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
AddFiles('*.*');
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.DAT');
ExclusionMasks.Add('Foto.IDX');
ExclusionMasks.Add('Foto.BLB');
end;
CloseArchive;
end;
what state the checkbox1 has (checked of not-checked), the 3 foto-files will
allways be in the zipfile.
what do I do wrong, and how should it be done ?
any suggestions ?
regards and thanks in advance....
Erik
|
|
| Back to top |
|
 |
Magnus Guest
|
Posted: Tue Jul 26, 2005 6:41 am Post subject: Re: Zipforge problem |
|
|
Erik Bellaard wrote:
| Quote: | I am using ther zipforge component and I am having a little problem:
[...]
what state the checkbox1 has (checked of not-checked), the 3 foto-files will
allways be in the zipfile.
what do I do wrong, and how should it be done ?
|
Without knowing ZipForge, two things look suspicious:
- is it necessary to put a backslash before the filename?
- you should first fill the ExclusionMasks-list and then call the
AddFiles-method
Just wild guesses... :-)
--
Magnus
|
|
| Back to top |
|
 |
Danijel Tkalcec (RealThin Guest
|
Posted: Tue Jul 26, 2005 8:39 am Post subject: Re: Zipforge problem |
|
|
Try it like this ...
with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
// first, define the Exclusion mask ...
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.DAT');
ExclusionMasks.Add('Foto.IDX');
ExclusionMasks.Add('Foto.BLB');
end;
AddFiles('*.*'); // AddFiles only _after_ you defined your
ExclusionMasks.
CloseArchive;
end;
--
Danijel Tkalcec
RealThinClient Components
http://www.realthinclient.com
|
|
| Back to top |
|
 |
Erik Bellaard Guest
|
Posted: Wed Jul 27, 2005 6:56 am Post subject: Re: Zipforge problem |
|
|
Hi,
I tried that with no (good) result.
I also tried to set a password on a file, but that also did not work...
with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
Pasword := 'test';
// first, define the Exclusion mask ...
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.*');
end;
AddFiles('*.*'); // AddFiles only _after_ you defined your
ExclusionMasks.
CloseArchive;
end;
Erik
"Danijel Tkalcec (RealThinClient)" <dtkalcec (AT) hotmail (DOT) com> schreef in bericht
news:42e5f6dd (AT) newsgroups (DOT) borland.com...
| Quote: | Try it like this ...
with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
// first, define the Exclusion mask ...
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.DAT');
ExclusionMasks.Add('Foto.IDX');
ExclusionMasks.Add('Foto.BLB');
end;
AddFiles('*.*'); // AddFiles only _after_ you defined your
ExclusionMasks.
CloseArchive;
end;
--
Danijel Tkalcec
RealThinClient Components
http://www.realthinclient.com
|
|
|
| Back to top |
|
 |
Danijel Tkalcec (RealThin Guest
|
Posted: Wed Jul 27, 2005 12:09 pm Post subject: Re: Zipforge problem |
|
|
Maybe the problem is the "" before the file name.
Did you try changing this line ...
| Quote: | ExclusionMasks.Add('Foto.*');
into this ?
ExclusionMasks.Add('Foto.*'); // no "" before Foto.*.
|
--
Danijel Tkalcec
RealThinClient Components
http://www.realthinclient.com
|
|
| Back to top |
|
 |
Danijel Tkalcec (RealThin Guest
|
Posted: Wed Jul 27, 2005 12:14 pm Post subject: Re: Zipforge problem |
|
|
Btw ... did you try contacting ComponentAce for support? Since this is their
component, I think they are the right address for all questions regarding
ZipForge. The rest of us can only guess where the problem might be.
--
Danijel Tkalcec
RealThinClient Components
http://www.realthinclient.com
|
|
| Back to top |
|
 |
Erik Bellaard Guest
|
Posted: Thu Jul 28, 2005 1:16 pm Post subject: Re: Zipforge problem |
|
|
Hi,
I had a very quick responce from componentAce (I mailed with Kevin) and I
have the following solution:
with zipforge1 do
begin
OpenArchive(fmCreate);
BaseDir := sDatadir;
FileMasks.Add('*.*');
if Checkbox1.Checked then
begin
ExclusionMasks.Add('Foto.*');
end;
AddFiles;
CloseArchive;
end;
and this solved my problem.
Kevin mailed me:
*** START TEXT ***
ExclusionMasks are used only when you call AddFiles without parameters:
ZipForge.FileMasks.Add(...);
ZipForge.ExclusionMasks.Add(...);
ZipForge.AddFiles;
When you call AddFiles with FileMask parameter, you must specify
ExclusionMask parameter as well:
procedure AddFiles(FileMask: String;SearchAttr: Word =
faAnyFile-faDirectory;ExclusionMask: String = ''); overload;
Example:
ZipForge.AddFiles('*.*', faAnyFile, 'Foto.*');
*** END TEXT ***
Kind regards and thanks for anyone who tried to give me a solution...
Erik
|
|
| Back to top |
|
 |
Magnus Guest
|
Posted: Thu Jul 28, 2005 2:34 pm Post subject: Re: Zipforge problem |
|
|
Erik Bellaard wrote:
| Quote: | Hi,
I had a very quick responce from componentAce (I mailed with Kevin) and I
have the following solution:
|
So 2 days after my wild guesses which turned out to be correct you came
to the same solution...
--
Magnus
|
|
| Back to top |
|
 |
Danijel Tkalcec (RealThin Guest
|
Posted: Thu Jul 28, 2005 3:18 pm Post subject: Re: Zipforge problem |
|
|
I'd say that contacting support is always the right thing to do. A wild
guess, even if it does work at the end, remains only a wild guess. And
there's a small difference between coding based on guessing and coding based
on contacting support or reading manuals.
--
Danijel Tkalcec
RealThinClient Components
http://www.realthinclient.com
|
|
| Back to top |
|
 |
|