Thank you all. It now works fine!

I used the way with the add-on for winzip to make it command line able.
There is indeed a command line tool.
First it did not want to work at all until I found out, that the trial
version of winzip wants the user to press a key (in the command line) to
proceed - which I was unable to emulate within php.
Luckily I have a registered version of winzip with which this works absolute
perfectly.

Here a short snippet:
$result = @exec("$winzip$zip_options $pathToArchive\\archive.zip
@$pathToPacklist\\packlist.txt);

Where
$winzip contains the path to the folder of winzip + wzzip (example: $winzip
= 'c:\\program files\\winzip\\wzzip';)
$options contains switches for winzip (I used: $zip_options =' -ybc -es';
#-ybc: no interactive interface/all questions are answered with 'yes'; -es:
fastest packaging since jpeg can't be packed better)
$pathToArchive contains the path to the new file which winzip should create
(example: $pathToArchive = 'C:\\')
$pathToPacklist contains the path to the folder where the file packlist.txt
is, which itself contains a return delimited list of all files to add to the
zip (whole filepath is necessary)

If someone is interested in that, I can give some additional info's

Thank you all for your help!

Stefan Rusterholz, [EMAIL PROTECTED]

----- Original Message -----
From: "Matt Friedman" <[EMAIL PROTECTED]>
To: "Stefan Rusterholz" <[EMAIL PROTECTED]>
Cc: "php general" <[EMAIL PROTECTED]>
Sent: Wednesday, October 31, 2001 5:39 AM
Subject: Re: [PHP] Zipping a folder on a win2000 server with php4.06


> There is a command line version of winzip.
>
> I don't know much about it, but a friend of mine was just saying the other
> day that he had used it to zip some files at the server in an ASP
> environment.
>
> In php you could call the winzip exectutable using exec. In asp you'd use
> some shell object or something like that.
>
> Matt.
>
>
> ----- Original Message -----
> From: "Stefan Rusterholz" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 30, 2001 8:00 AM
> Subject: [PHP] Zipping a folder on a win2000 server with php4.06
>
>
> Hi
>
> Does someone out there know, how I can zip a folder with some files in it?
> It should be readable for Winzip.
>
> Enviroment: Win2000 Server.
> VB was available if useful.
> Additional Components (applications, dll's or whatever) could be loaded if
> needed.
>
> I didn't find a usable entry in the manual, so if you tell me to rtfm -
> please point me to the corresponding entry also :)
>
> Thanks in advance
>
> Stefan Rusterholz, [EMAIL PROTECTED]
> ----------------------------------
> interaktion gmbh
> Stefan Rusterholz
> Zürichbergstrasse 17
> 8032 Zürich
> ----------------------------------
> T. +41 1 253 19 55
> F. +41 1 253 19 56
> W3 www.interaktion.ch
> ----------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to