PDA

View Full Version : Unzip function


yossim
June 3rd, 2009, 06:18 AM
Hi,

How can I unzip a file from C - code?

Alternativley, How can I create a shell file with UNZIP darwin command, and execute it from my c-code?

Thanks

ElDiabloConCaca
June 3rd, 2009, 10:41 AM
To run the terminal command "unzip" from a C program, you'll want to look at the family of "exec" commands:

http://www.opengroup.org/onlinepubs/000095399/functions/exec.html

yossim
June 4th, 2009, 08:39 AM
I got the answer -

system("unzip filename");