|
Post by heiko2 on Aug 9, 2006 8:04:51 GMT -5
Hello Kevin
In your help file you write about the "RelativePathList property" and the possibility to manipulate the extracted path names.
But I want to manipulate the pathname at the zip procedure (for better data handling).
Thats the folder structure:
c:\folder1\text1.txt c:\folder1\text1.rtf c:\folder1\text1.htm c:\folder1\subfolder\subtext1.htm c:\folder2\text2.txt c:\folder2\text2.rtf c:\folder2\text2.htm
I want to zip all the files of the folder "folder1". But also I want to store the path "folder1".
Normally it is:
Zip.RootDir := 'c:\folder1\'; Zip.Recurse := true; Zip.AddDirEntriesOnRecurse := true; Zip.StorePaths := true; Zip.RelativePaths := true; Zip.FilesList.Add('*.*'); Zip.Zip; So I will get
text1.txt -> Path= text1.rtf -> Path= text1.htm -> Path= subtext1.htm -> Path=subfolder But what I have to do to store the path "folder1" and "folder1\subfolder"?
Best Regards Heiko
|
|
|
Post by Kevin on Aug 14, 2006 18:32:09 GMT -5
I think that if you set the RootDir to C:\ and put 'c:\folder1\*.*' into the fileslist you might get what you are after.
Kevin
|
|
|
Post by heiko2 on Aug 16, 2006 5:02:49 GMT -5
Hello Kevin,
thanks for your hint. It works. I changed my code to the following lines (GetParentFolder is my own function to set the parent folder):
Zip.FilesList.Clear; Zip.AddDirEntriesOnRecurse := false; Zip.RelativePaths := true; Zip.RootDir := GetParentFolder(Folder); Zip.RelativePathList.Add(Folder); Zip.FilesList.Add(Folder + '*.*');
Thanks.
|
|