Archive: Zipping up a directory


Zipping up a directory
I am looking for something that will zip up a specified directory in the standard zip compression method.
I need this to use for people making D-Day maps, where my app currently copies all used files involved with their map to an output directory.

Does anyone know of one lying around which I could run like a command-line program, to zip up the dir, without the user having to do anything?

-Stu


Maybe here.
I don't think there is a plugin to do that.
So an alternative commandline tool. to use with
"!System"


http://www.info-zip.org/


Ok thanks.
That will work great!
But I can't find out how to get it to include whole directories.

Can anyone shed some light upon this :)

-Stu


I'm going to use 7zip's compression util, simply because it's just one exe file.
Look's like I'm going to have to make up a files list instead, because I'm unable to zip up a whole directory.

-Stu


Hi Afrow.
I looking for a function to build a File List a directory (i'm a bit in a hurry ;)). I wonder if you allready did that.
The idea is to make a file list text file with everything that has to be included in a NSIS instalation kit.

Thanks

Crisp


Use FindFirst, FindNext and FindClose to find the files matching a wildcard in a given directory, then use FileOpen, FileWrite and FileClose to write the results to a text file. Docs can be found here. Searching for FindFirst on the Archive could be useful too.


There is a far far better solution to zipping up a directory without having to create a files-list.

Here is what I did:
File /oname=$INSTDIR\7za.exe 7za.exe
nsExec::Exec "$INSTDIR\7za.exe a -tzip -r dir.zip *" ;zip up dir
nsExec::Exec "$INSTDIR\7za.exe d $INSTDIR\dir.zip 7za.exe" ;remove 7za.exe

Because the 7za.exe file is in the directory in which you want to zip up (it has to be) then it gets added into the zip file too.
The second execution removes the 7za.exe file from the zip file leaving the fresh zip.

-Stu


Using 7-zip (with support for many compression methods) is a bit overkill for only zip. Why not use Info-Zip or another application? It's way smaller.


Originally posted by Joost Verburg
Using 7-zip (with support for many compression methods) is a bit overkill for only zip. Why not use Info-Zip or another application? It's way smaller.
I asked on this forum for a zip-up program, and I only had one reply saying "use 7-zip"
I searched for other command-line apps for zipping up stuff, but I never found one.

-Stu