Solved

How to remove a file from a zip file

Posted on 2002-05-24
12
151 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
[X]
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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

763 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