Results 1 to 2 of 2
  1. #1
    leejw29's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    221
    Reputation
    10
    Thanks
    2,756

    Adding files into Existing Zip archive (and replacing existing entries)

    Hello

    As the title says, how can I add files into an Existing Zip archive, and replacing existing entries in it?
    I've tried using the DotNetZip library, can't really find a way to do it.

    So anyone that has any idea how it can be done, or have a library to recommend, please help!

    Currently the method I'm using is to:
    1. Copy the MainZip.zip to a folder.
    2. Extract files in MainZip.zip to a temp folder.
    3. Write FilestoAdd.zip to the temp folder.
    4. Extract FilestoAdd.zip to the temp folder, (replacing existing)
    5. Archive the entire temp folder and name it "MainZip.zip"
    6. Delete the original MainZip.zip
    7. Move newly archived MainZip.zip into original folder.
    8. Delete temp folder.

    As you can see, this is very long and troublesome, so I'm looking for a shorter path.
    Do share your ideas!

    Thanks
    Last edited by leejw29; 12-30-2013 at 08:42 AM.

  2. #2
    Geometrical's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    In the middle of nowhere.
    Posts
    1,034
    Reputation
    331
    Thanks
    10,335
    My Mood
    Chatty
    I'm not really sure, but you can treat zip archives as normal folders. So would be advised to use the elements provided in IO namespace.

Similar Threads

  1. [Help]Copy and replacing files
    By nathanael890 in forum Visual Basic Programming
    Replies: 20
    Last Post: 04-05-2010, 04:05 PM
  2. can you make a rar file into a zip???
    By crazy1100 in forum General Game Hacking
    Replies: 3
    Last Post: 10-07-2009, 10:41 PM
  3. make .vbp file into .exe... like idk how to make it a exe
    By Oneirish in forum Visual Basic Programming
    Replies: 3
    Last Post: 03-29-2008, 07:26 AM
  4. NEED DELPHI 7 & SEARCH AND REPLACE LINK
    By ilovepie21 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 02-25-2008, 11:12 PM
  5. need Actual Search and Replace v2.6.5
    By g36gunner in forum Visual Basic Programming
    Replies: 3
    Last Post: 01-02-2008, 03:49 PM