zip files from different folders

Nov 1, 2010 at 12:58 AM

Hello guys, great work!!!

One question for the moment....

i  have

C:\test

and these files

a = C:\test\test1\test.txt

b = C:\test\test2\test.xls

c = C:\test\test3\test.bmp

if i add these files to a zip and save it in the C:\test it makes me a zip file with the test file and its subfolders and subfiles.I want to make a zip file in the C:\test in witch it will be contain only the files test.txt,test.xls etc. is there any way to do this??

zip.addfile(a);

zip.addfile(b);

zip.addfile(c);

 

 

 

Coordinator
Nov 1, 2010 at 3:33 AM
Edited Nov 1, 2010 at 3:34 AM

yes, there is a way to do what you want.

check the documentation on the AddFile methods.  You want the 2nd overload, the one that accepts a directoryPathInArchive argument.