cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Aleco_
Level 2

Unzip a File

Well, I have a 18MB Zipped File, that after installing the EXE I have. It will automatically unzip the 18MB File, and create a folder for it.

Unless you think just include the items in the Zip File would make it easier, I know that. But I don't want the file itself to be that big.


Thanks,
Alec
Labels (1)
0 Kudos
(1) Reply
tpattison
Level 3

Aleco™ wrote:
Well, I have a 18MB Zipped File, that after installing the EXE I have. It will automatically unzip the 18MB File, and create a folder for it.

Unless you think just include the items in the Zip File would make it easier, I know that. But I don't want the file itself to be that big.


Thanks,
Alec


We use zip files here to deliver sample files and tutorials. We use an Open Source command line zip component called 7-Zip. You can download the command line utility here.

Here is some sample code from one of my IS projects.

STRING str7ZipPath, strSrcPath, stCmdLine, strDestPath

str7ZipPath = SUPPORTDIR ^ "7za.exe";
strSrcPath = SUPPORTDIR ^ "Foo.zip";
strDestPath = TARGETDIR ^ "\\Foo\\";

strCmdLine = "x " + strSrcPath + " -o" + strDestPath + " -r -aoa";

LaunchAppAndWait(str7ZipPath, strCmdLine, LAAW_OPTION_WAIT|LAAW_OPTION_SHOW_HOURGLASS);


This is the breakdown of the command line syntax

"x " + strSrcPath = Extracts files from an archive with their full paths
" -o" + strDestPath = Specifies a destination directory where files are to be extracted.
" -r -aoa" = Recurse subdirectories and Overwrite All existing files without prompt.

Hope this helps,
TP
0 Kudos