Re: Zipping a folder on a win2000 server with php4.06

From: Date: Wed, 31 Oct 2001 14:22:48 +0000
Subject: Re: Zipping a folder on a win2000 server with php4.06
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-73015@lists.php.net to get a copy of this message
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, s.rusterholz@interaktion.ch ----- Original Message ----- From: "Matt Friedman" <matt@sprynewmedia.com> To: "Stefan Rusterholz" <scripting@interaktion.ch> Cc: "php general" <php-general@lists.php.net> 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" <scripting@interaktion.ch> > To: <php-general@lists.php.net> > 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, s.rusterholz@interaktion.ch > ---------------------------------- > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#73015) next »