Login  
Search All Forums
Dart Home | PowerTCP Zip Compression for .NET | Custom Development Reply | PowerTCP Zip Compression for .NET Topics | Forums   
AuthorForum: PowerTCP Zip Compression for .NET
Topic: Set Path
jshear swbc

From: San Antonio, TX USA
Posts: 2
Member Since: 03/18/10
posted March 18, 2010 12:38 PM

In code I am collecting documents from various locations and adding them to an archive. The folks I am sending the zip to would like to have it so all those files unzip to a folder. Is there a way to set the path in the archive. I know I could actually copy all the files to a folder and then zip that, I was hoping to not have to do the copy.

So I get files
C:\temp\file1.pdf
c:\windows\file2.pdf
\\share\folder\file3.pdf

zip would contain
foldername\file1.pdf
foldername\file2.pdf
foldername\file3.pdf

thanks
john
Jason Farrar (Admin)

From: Oneida, NY USA
Posts: 223
Member Since: 07/24/07

Extra Support Options
Custom Application Development

posted March 18, 2010 3:34 PM

Hi John,

Each Archive object is also a collection of ArchiveItem objects. You can loop through the ArchiveItem objects and set their name properties to reflect the directory in which you would like to have them unzipped to.

-Jason

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

jshear swbc

From: San Antonio, TX USA
Posts: 2
Member Since: 03/18/10
posted March 19, 2010 9:31 AM

Thanks Jason, have tried that a couple different ways. 1) create an ArchiveItem then change then name and add to the Archive. However the name change is not allowed. 2) After all items are added loop through all items and change the name but again the name change is not allowed. I get no error just the name is not changed.

john
Reply | PowerTCP Zip Compression for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX