|
Post by Sergey on Apr 10, 2006 3:59:41 GMT -5
Hello! I use version VCLZip Pro Version 3.04 Buid 1 Example of a code: case LevelPackGroup1. ItemIndex of 0: Zip. PackLevel: = 0; 1: Zip. PackLevel: = 3; 2: Zip. PackLevel: = 6; 3: Zip. PackLevel: = 9; end; zip. ZipName: = Edit3.text; zip. DestDir: = edit2. Text; zip. FilesList. Add (edit2. Text); zip. Recurse: = false; zip. StorePaths: = false; zip.Zip; end;
But why that the file is not compressed. What is the problem? Thanks!
|
|
|
Post by Kevin on Apr 13, 2006 21:39:01 GMT -5
Please tell me more about what you mean by the file is not compressed. Do you mean that it does not show up in the zip file at all, or that it shows up in the zip file with no compression?
If it is not showing up in the zip file at all, please check to see exactly what is going into the FilesList. It needs a full path and filename.
Kevin
|
|
|
Post by Sergey on Apr 14, 2006 0:14:31 GMT -5
Please, get me samples...
|
|
|
Post by Kevin on Apr 14, 2006 7:13:13 GMT -5
Your example should work (except DestDir is only relevant to unzipping).
What I was saying is that what you add to fileslist should have a complete path like:
zip.FilesList.Add('c:\mydirectory\myfile.txt');
If, in your example, edit2.txt has something like this, you should be getting a file to zip correctly. edit2.txt should not just have something like 'myfile.txt' in it, it should have the whole path.
|
|