Solved

How to remove a file from a zip file

Posted on 2002-05-24
12
147 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 69

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
 

Author Comment

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

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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 69

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 69

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now