Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to remove a file from a zip file

Posted on 2002-05-24
12
150 Views
Last Modified: 2010-05-02
Hi

   Could someone advice me on how i could remove a file from a
zip file.

Thanx
0
Comment
Question by:b3cf
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7033320
Most Zip utilities have a command line option to do this.  Whick one are you using?

Anthony
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7033359
0
 
LVL 1

Expert Comment

by:raid999
ID: 7033754
If you are using Winzip then you just right click on the file and the click on delete
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:b3cf
ID: 7034321
Thanx guys. I have to do this in a VB program.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7034327
The link I gave you is to use from VB.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7034370
>>I have to do this in a VB program. <<
I realize that, you can still call may of the Zip utilities from VB.  Hence the question as to what you were currently using.

Anthony
0
 

Author Comment

by:b3cf
ID: 7034480
Hi

   I am using zip32.dll and unzip32.dll. Do you
have some code that i can use to remove the file when
the file name is known.

   Otherwise i have unzip the whole zip file and only
zip the files that i need. Since the file i have to unzip
has a lot of sub folders its quite cumbersome.  

Thanx alot  
 
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7034521
I suspect that you are referring to the Info-Zip libraries that Eric (emoreau) recommended earlier on, with the link http://vbaccelerator.com/codelib/zip/zipvb.htm

So I will let him explain how to use them, as I am unfamiliar with them.

Anthony
0
 

Author Comment

by:b3cf
ID: 7036986
Hi Eric

     Any help on that ?

Thanx
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 7037069
I have never seen a delete function into the zip librairie. One way of doing it is to unzip in a folder, delete the file and rezip the folder.

Maybe, you could also use the command line of WinZip (I don't know the switches) to delete one of the file.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7037072
you can also think of switching to a commercial components (which I am sure is doing it)

http://www.xceedsoft.com/products/ZipCompL/index.htm
0
 

Author Comment

by:b3cf
ID: 7037084
Thanx Eric,

   I will do the unzipping and then removing the unwanted and zipping.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question