Make ZIP files from ASP.NET with VB

Hi somebody have an example or an idea to how to make ZIP files from a 
folder?

Thanks a lot 

0
Marcos
9/17/2010 6:14:30 PM
dotnet.framework.aspnet 1425 articles. 0 followers. Follow

3 Replies
863 Views

Similar Articles

[PageSpeed] 8

On 9/17/2010 2:14 PM, Marcos G. wrote:
> Hi somebody have an example or an idea to how to make ZIP files from a
> folder?
>
> Thanks a lot
<http://www.google.com/#sclient=psy&hl=en&site=&source=hp&q=zip+libaries+for+net&btnG=Google+Search&aq=f&aqi=m1&aql=&oq=zip+libaries+for+net&gs_rfai=CsSyRB82TTOGbJJG6hASEv7n2CwAAAKoEBU_QB9Oo&psj=1&fp=207a1c3c62b92b94>
0
Mr
9/17/2010 8:19:31 PM
Have a look on codeplex (http://www.codeplex.com) - there are several
zip libraries there.

Can't vouch for them as I have not had the need to use them.

Hope this helps,
Mark


On Fri, 17 Sep 2010 13:14:30 -0500, "Marcos G."
<marcosgalaviz@hotmail.com> wrote:

>Hi somebody have an example or an idea to how to make ZIP files from a 
>folder?
>
>Thanks a lot 
-- 
       |\      _,,,---,,_          A picture used to be worth a
ZZZzzz /,`.-'`'    -.  ;-;;,       thousand words - then along
      |,4-  ) )-,_. ,\ (  `'-'     came television!
     '---''(_/--'  `-'\_)          

Mark Stevens  (mark at thepcsite fullstop co fullstop uk)

This message is provided "as is".
0
Mark
9/18/2010 7:11:23 AM
On Sep 17, 8:14=A0pm, "Marcos G." <marcosgala...@hotmail.com> wrote:
> Hi somebody have an example or an idea to how to make ZIP files from a
> folder?
>
> Thanks a lot

http://dotnetzip.codeplex.com/

using (ZipFile zip =3D new ZipFile())
 {
     // add this map file into the "images" directory in the zip
archive
     zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
     // add the report into a different directory in the archive
     zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf",
"files");
     zip.AddFile("ReadMe.txt");
     zip.Save("MyZipFile.zip");
 }


private void MyExtract()
  {
      string zipToUnpack =3D "C1P3SML.zip";
      string unpackDirectory =3D "Extracted Files";
      using (ZipFile zip1 =3D ZipFile.Read(zipToUnpack))
      {
          // here, we extract every entry, but we could extract
conditionally
          // based on entry name, size, date, checkbox status, etc.
          foreach (ZipEntry e in zip1)
          {
            e.Extract(unpackDirectory,
ExtractExistingFileAction.OverwriteSilently);
          }
       }
    }
0
Cubaman
9/20/2010 7:16:05 AM
Reply:

Similar Artilces:

Hidden files in Ms-Query cause ODBC connect errors or Query is wac
I have a Query fetch_from_bob that moves data (collapses records,unique key search, etc...) from excel spreadsheet "bob" to excel spreadsheet "fred". Fred and bob live in the same directory" c:\123directory" on the same computer. I allow this query to execute/refresh data automatically when one of the query paramaters is changed. This works great. I also have a macro that invokes the query to refresh the data whenever the user desires. This works great as well. The macro literally has all the VB code to execute the query. But I'm just a part time progra...

Outlook: Can't open JPEG files
I have Outlook 2000 an unable to open JPEG files. What setting has to be changed to open these files? ...

Re: how to make a stealth application
"Joseph M. Newcomer" wrote in message " Note that I cannot install software on my email machine when logged in as 'email'. I have to log off, log in as admin, install the software, and then log back in as 'email'. Worth pointing out that some children who build antispam software only allow the software to run for the installing userid, not have it installed system-wide by a sysadmin. A waste of money." Sir, I am 100% agree with you in above case, but i am just puting my point here, Please i am very-2 grateful if you point out anything that i have ...

File Edit toolbar is missing
The File Edit toolbar in Excel is missing First thing to check: Tools|customize|toolbars tab|make sure worksheet menubar is selected. Well, maybe the first thing to check is to verify that you can see all of excel--it's not just off the display window??? stellarmellor wrote: > > The File Edit toolbar in Excel is missing -- Dave Peterson ...

8192 rows limit when opening wk1 files ?
Hello, I am opening a .wk1 file, which contains around 60K rows, but only the first 8192 rows appear in Excel. Is there any way to have all the rows in the Excel file ? Thanks, Paul "paul" wrote... >I am opening a .wk1 file, which contains around 60K rows, >but only the first 8192 rows appear in Excel. > >Is there any way to have all the rows in the Excel file ? WK1 as in Lotus 1-2-3 Release 2.x native file format? Such .WK1 files support a single worksheet of 256 columns and 8,192 rows. PERIOD. Did you generate this '.WK1' file using a program other then...

How to make a column of formulas all ROUND
I created a spreadsheet in which I have a column of formulas. Most of these fomulas are simply pulling a single number off another sheet. I want to make all the formulas ROUND versions of the existing formula without having to go into each cell and making the change. They are not in order to which I can just make the first fomula a ROUND fomula and copy down. So, is there a way to select a range of cells and make the existing fomulas all ROUND versions? Thanks. Would this help? Sub RoundAdd() Dim mystr As String Dim cel As Range For Each cel In Selection If...

VB: using a string to set a range object?
I'm a bit new to the excel "range" object type. I was suprised to see that while I can do: dim chunk as Range chunk = .Range(A5:B6) I apparently cannot do: dim chunk as Range dim stuff as string string = "A5:B6" chunk= .Range(string) How can I concatenate up a string describing a range, and then use it to define a range object's target cells? - Ross. Oops, I meant chunk = .Range("A5:B6") in the first example - I forgot the quotes. R. "RGK" <nothanks@nospam.go> wrote in message news:RqydnSWzbu_OEZbeRVn-2A@...

Best way to read an xml file
Hi; If I need to read an XML file - basically the SAX approach where I just need each node in order - one pass, read-only - what is the best way to do this. It looks like it's XmlReader but I want to verify that. ??? -- thanks - dave "David Thielen" <thielen@nospam.nospam> wrote in message news:BEA51BCB-B200-4104-B061-CA32FECD9DFD@microsoft.com... > If I need to read an XML file - basically the SAX approach where I just need > each node in order - one pass, read-only - what is the best way to do this. Yes, if your only requirement is a firehose forward reader,...

Large Files with Strongly Typed Dataset
I have an xsd file that I use to create a strongly typed dataset in my project. In the past, I have used the ReadXml method to load xml files into the generated class and read data in using this class. These files have now become big (order of 100MB) and this completely kills the readxml performance. I have read multiple posts that tell you not to use datasets for large files. I even tried calling BeginLoadTables before starting the read. However, I really need the strongly typed dataset functionality in my program - it forms the core of my project. Is there a way I can load this data into t...

Missing rtl70bpl file
After receiving what seemed to be a false positive from Avast free Home edition I now get (after every restart), the following... "This application has failed to start because rtl70bpl was now found. Reinstalling the application may fix the problem". Appreciate any advice on how to reinstall same. Have Googled for help but have not found the correct site. TIA. franktee Winxp Pro SP3 On Dec 3, 11:42=A0am, franktee <frank...@discussions.microsoft.com> wrote: > After receiving what seemed to be a false positive from Avast free Home > edition I now get (afte...

Keeping Archive File in Folders List
I have a colleague who placed the Archive file at the top of her list of folders in Outlook so it is easy to open the Archive file and search for a message or appointment if necessary. She can't remember how she managed to do this and I would love to do this myself.Any suggestions? Thank You File-> OPen-> Outlook Data File... and browse to archive.pst -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Joan" <anonymous@discussions.microsoft....

Error saving Excel files in a network drive
I have a problem saving Excel files onto a network drive. I get an error saying it was imposible to save the file. It creates a temporary file and then I have to open it and save it as a new document. This issue doesn�t occur saving the file in my hard disk. This happens with "Full control" access to the shared folder... I have Windows XP and Office 2000. Thanks in advance Mateo. Hi Mateo, > I have a problem saving Excel files onto a network drive. I get an error > saying it was imposible to save the file. It creates a temporary file and > then I have to open it and sav...

File in use .... is locked for editing
Please help. In Microsoft Excel 2000, we seem to be getting the above error message frequently. No other users are in the file, and there aren't any temporary files relating to the file in question. Any ideas on what is causing this? We are running a mixture of Windows 2000 & XP machines on to a Small Business Server 2000. Hope to hear from someone soon Regards Simon I think you killed the usual answer of cleaning the temp folder. But have you rebooted? Maybe there's a hidden instance of excel running that "owns" the file. And if the file/workbook is on a net...

VSTO 2005: Error in Schema Files Generation
In XML schema generation from a WordML document, VSTO 2005 VSTO creates 6 files (general naming pattern): XML.XSD ... XML5.XSD. For our file names we use a special syntax for additional information on the project status. - Syntax for file names: {PRE}={TOPIC}_{POST}.{STATUS}.{FORMAT} Now, VSTO 2005 modifies its general naming pattern to XML.{STATUS}{I}.{FORMAT}. - Example - XML.ABCD.XSD - XML.ABCD1.XSD (instead of XML1.ABCD.XSD) - ... - XML.ABCD5.XSD (instead of XML5.ABCD.XSD) I consider this behavior of VSTO 2005 as a programming error. - Is this consideration correct? - How ...

Pub 2003 V11 How do I make A6 booklet pages in sequence A4 print
I wish to make up a booklet of an A6 size and have pages in sequence when developing booklet. Then sent to printer so that pages are printed back to back and when pages are removed and sequenced and folded, it makes a A6 booklet. File, page setup, booklet, portrait, type 10.5cm width, 14.8 height. This will create two small A6 booklets. You will have to cut the booklets apart. If you plan to use A6 paper, you will need to setup your printer first for the correct custom size. Publisher will keep the pages in sequence. -- Mary Sauer MVP http://msauer.mvps.org/ "About...

No menu bars appear on newly installed Outlook 2003 (PST file)
I just built up a new system (Windows XP SP2, Office 2003 Pro) and move my Outlook.pst file over from my old system. Since I had Norton Internet Security 2005 installed, the anti-spam toolbar was displayed. However, after only a few hours of usage, the menu bars are not working properly: 1. When I start up Outlook and mail is displayed, there are no menu bars displayed. None. 2. If I go to the lower left corner navigation bar and select mail and Open in New Window, the standard and formatting menu bars are displayed. But the Norton Anti-Spam bar does not display. 3. When I open an indiv...

Reading EML files
Does anyone know if Outlook can be configured to open .eml files? I wrote a program that creates .eml files. Outlook Express can open them but Outlook can't. Is there a way to get Outlook to open these? If not, does anyone know how I can create a file that Outlook can open (such as a .msg)? Is there a COM object that creates these? Any help will be appreciated. John ...

RPC .x files.
I need to talk to some third party equipment. The company has provided an RPC interface consisting of three .x files. The provided third party documentation just glosses over how to compile and use these files. Though the equipment is new, I think this interface is quite old. The documentation example says to use the command "rpcgen32.exe filename". They say the command my differ depending on the software package. I searched the Microsoft site and found a bunch of stuff. At first I looked at the midl compiler. The .idl files look different then the .x files. Can someone please poin...

Code to make a Spinner button work with Filters on a Pivot Table
I create a lot of Pivot Tables with filter fields. Years ago I saw a demo on this tool and loved it. I got the code and my computer died before I was able to use it and my backup was a week old! Does anyone have this code? -- TheTraveler Hi Take a look on Debra Dalgleish's site http://www.contextures.com/PivotMultiPagesChangeAll.zip -- Regards Roger Govier TheTraveler wrote: > I create a lot of Pivot Tables with filter fields. Years ago I saw a demo on > this tool and loved it. I got the code and my computer died before I was > able to use it and m...

convert .csv file to .cub using access
I am using Microsoft Access to work with a .CSV file that contains 250,000 rows of information. I'd like to convert that file to a .CUB file so that I can use Microsoft Data Analyzer to "drill" down the information. Does anyone have any ideas? Hi John, As I understand it, the normal way would be to use the Cube Wizard in the OLAP Manager, after importing and normalising the file into SQL Server tables. It may be possible to use the Cube Wizard against an ODBC connection to an MDB file. But as I understand it the point of using OLAP cubes is to denormalise a set of views...

Combining VISIO files with mail merged Word document
I am trying to create a composite document that has four pages. The first page is a VISIO (2003 Professional) file that contains several pictures and a converted AutoCAD (R14) drawing file. The following three pages are a Word merged file created from an Access database. I would like to be able to have a combined file for for hard copy reproduction. This particular document has 220 reports that all have the same basic format. I have tried exporting various file types (tif, jpg, wmf, bmp, etc.) from VISIO, then inserting into Word as picture or object and most are unacceptable quali...

How do you make captions for pictures in Publisher 2003
I have a publisher document with many pictures in it. What is the best way to create a caption for each picture? I've used text boxes. -- Don - Publisher 2000� Vancouver, USA "Wayne" <Wayne@discussions.microsoft.com> wrote in message news:8580D219-405D-470E-9631-A986A89E460B@microsoft.com... >I have a publisher document with many pictures in it. What is the best way > to create a caption for each picture? > "Wayne" <Wayne@discussions.microsoft.com> wrote in message > news:8580D219-405D-470E-9631-A986A89E460B@microsoft.com... >>...

Single AD 2000 DC...would you first make a BDC of a second AD2000
Just one W2Ksp4 DC. No Exchange in the environment. Only AD and DNS are on this box. File/print, iis, sharepoint, everything has been off-loaded to other W2K3sp2 servers. Do I make a W2K BDC before I attempt an upgrade? My gut says no, the migration path is too neat and clean to make a W2K3sp2 a BDC to my existing and then promote it. Thank you very much for your thoughts, ideas, warnings or otherwise. Cheers. Hello Dirt, It is recommended to have at least 2 DC/DNS/GC per domain for failover and redundancy. In your case add a second server to the domain which you install ...

File Says Read Only Even After Closing It
Hi, One of my file is opening as Read Only, for me and everyone, even after I closed the file. How can I sort out this? -Dileep Could it be marked readonly in windows? rightclick on it (in windows explorer) and choose properties. Or maybe http://contextures.com/xlfaqApp.html#ReadOnly from Debra Dalgleish's site. Dileep Chandran wrote: > > Hi, > > One of my file is opening as Read Only, for me and everyone, even after > I closed the file. > How can I sort out this? > > -Dileep -- Dave Peterson ...

Make all dates display 01 as the day
I have a list of dates with various numbers listed as the day (03/25/2009, 04/05/2010, etc.) I need a formula to change all of the dates to display 01 as the day (03/01/2009, 04/01/2010, etc). Thanks! -- LL28 First date in A1 (03/25/2009) In B1 =DATE(YEAR(A1),MONTH(A1),1) will display 01/05/2009 best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "LovingLife28" <LovingLife28@discussions.microsoft.com> wrote in message news:FDFA5015-6DF0-4374-842F-C8DA14E9952F@microsoft.com... > I have a list of dates with various number...