Make ZIP files from ASP.NET with VB

Discussion in 'ASP .Net' started by Marcos G., Sep 17, 2010.

  1. Marcos G.

    Marcos G. Guest

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

    Thanks a lot
    Marcos G., Sep 17, 2010
    #1
    1. Advertising

  2. Marcos G.

    Mr. Arnold Guest

    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>
    Mr. Arnold, Sep 17, 2010
    #2
    1. Advertising

  3. Marcos G.

    Mark Stevens Guest

    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."
    <> 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".
    Mark Stevens, Sep 18, 2010
    #3
  4. Marcos G.

    Cubaman Guest

    On Sep 17, 8: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://dotnetzip.codeplex.com/

    using (ZipFile zip = 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 = "C1P3SML.zip";
    string unpackDirectory = "Extracted Files";
    using (ZipFile zip1 = 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);
    }
    }
    }
    Cubaman, Sep 20, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley
    Replies:
    1
    Views:
    593
    Andrew Thompson
    Sep 16, 2004
  2. Replies:
    0
    Views:
    1,713
  3. HARI OM
    Replies:
    0
    Views:
    17,401
    HARI OM
    May 3, 2005
  4. MoshiachNow
    Replies:
    2
    Views:
    270
    Ilya Zakharevich
    Oct 4, 2006
  5. Bo Yang
    Replies:
    9
    Views:
    298
    -berlin.de
    Nov 20, 2006
Loading...

Share This Page