Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to remove a file from a zip file

Posted on 2002-05-24
12
Medium Priority
?
156 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
Technology Partners: 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 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

705 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