Solved

How to unzip a .zip file (using C++ builder)

Posted on 2003-11-24
9
1,547 Views
Last Modified: 2008-03-17
Hi, I need to know how can I unzip a file located in C:\Program files\ to this same directory, but I can't have any dialogs being shown during the process.

Cheers
0
Comment
Question by:luizblink182
9 Comments
 
LVL 3

Expert Comment

by:monkesdb
ID: 9815964
you need to get zlib or zziplib. zlib is the full thing whereas zziplib is a thirdparty lightweight alternative

http://www.gzip.org/zlib/
http://zziplib.sourceforge.net/

you should find examples on how to use them on their sites
0
 

Author Comment

by:luizblink182
ID: 9816452
I already tried to use those. No success.
0
 
LVL 2

Expert Comment

by:JensUniweb
ID: 9817345
http://www.info-zip.org/ is another library for zip files.
0
Independent Software Vendors: 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!

 
LVL 2

Expert Comment

by:JensUniweb
ID: 9817354
gzip and zip are diffrent things. And now zip have there version 9 which is not compatable with the old versions. I don't think info-zip supports zip version 9.
0
 

Author Comment

by:luizblink182
ID: 9818187
I didn't get how to use these libraries.

Can anyone give me the code to extract a zip file into a specified directory? That's all I need.
0
 
LVL 16

Accepted Solution

by:
George Tokas earned 50 total points
ID: 9826273
0
 
LVL 2

Assisted Solution

by:JensUniweb
JensUniweb earned 50 total points
ID: 9830187
Is it realy code you need or how you use them in your enviroment?? What enviroment are you using. Windows, Unix? GCC, VC++, VC .NET, BCB or any other?

Look at this link for some code. Don't know if that helps you.

http://www.stillhq.com/cgi-bin/cvsweb/~checkout~/howto-zlib/example.c?rev=1.1.1.1&content-type=text/plain
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10285803
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: gtokas {http:#9826273} & JensUniweb {http:#9830187}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

749 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