|
Post by Christoph on Nov 30, 2003 13:02:33 GMT -5
Hi,
with this I zip many files in one archive: (folders included)
zip1.ClearZip; zip1.FilesList.AddStrings(listbox1.items); zip1.ZipName := progpfad+'\'+archivname; zip1.RelativePaths := true; zip1.RootDir := progpfad; zip1.Zip ;
But now I want zip each folder in a separate zip archive:
e.g. 10 folders: each folder holds many files
the result: 10 zip archives named with the name of folder.
Is there any idea? Thank you very much
Best regards Christoph
|
|
|
Post by Kevin on Nov 30, 2003 15:01:40 GMT -5
if your list contains the folders you want to be backed up then something like the following. You may have to change this some because I didn't test it any compiler. I'm sure I've got some things incorrect but the idea is there: for i := 0 to listbox1.items.count do begin zip1.Zipname := ChangeFileExtent(listbox1.items,'zip'); zip1.FilesList.Add(listbox1.items+'\*.*'); zip1.Recurse := true; // if you want subdirs zip1.Zip; end;
|
|
|
Post by Christoph on Dec 5, 2003 11:02:03 GMT -5
Thank you, Kevin. That's it. Merry XMas.
Best Regards Christoph
|
|