Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

How to remove a file from a zip file

Hi

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

Thanx
0
b3cf
Asked:
b3cf
  • 4
  • 4
  • 3
  • +1
1 Solution
 
Anthony PerkinsCommented:
Most Zip utilities have a command line option to do this.  Whick one are you using?

Anthony
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
raid999Commented:
If you are using Winzip then you just right click on the file and the click on delete
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
b3cfAuthor Commented:
Thanx guys. I have to do this in a VB program.
0
 
Éric MoreauSenior .Net ConsultantCommented:
The link I gave you is to use from VB.
0
 
Anthony PerkinsCommented:
>>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
 
b3cfAuthor Commented:
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
 
Anthony PerkinsCommented:
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
 
b3cfAuthor Commented:
Hi Eric

     Any help on that ?

Thanx
0
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
b3cfAuthor Commented:
Thanx Eric,

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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now