pnj Posted November 2, 2006 Share Posted November 2, 2006 I'm running php 5 on Windows XP. I'm wondering if there's a way to call Windows XP's integrated zip file creation utility from the command line. The only place I can find this is in the XP context menu, but I imagine there must be a command. I want to run it from a php script using the system() function. system ("zip folder/*.* foo.zip"); // or something like that.thanks,pnj Link to comment https://forums.phpfreaks.com/topic/25918-windows-zip-file-creation-from-system/ Share on other sites More sharing options...
trq Posted November 2, 2006 Share Posted November 2, 2006 Do you have the [url=http://au3.php.net/zip]zip[/url] extension installed? Why not use that? Link to comment https://forums.phpfreaks.com/topic/25918-windows-zip-file-creation-from-system/#findComment-118369 Share on other sites More sharing options...
pnj Posted November 2, 2006 Author Share Posted November 2, 2006 I was under the impression that the zip extension could only read zip files, not write them. I see zip_open(), zip_read() and zip_close()... but nothing like zip_write()... Link to comment https://forums.phpfreaks.com/topic/25918-windows-zip-file-creation-from-system/#findComment-118376 Share on other sites More sharing options...
trq Posted November 2, 2006 Share Posted November 2, 2006 Ive never used it but it looks to me like you could create zip files using [url=http://php.net/manual/en/function.ziparchive-open.php]ZipArchive::open[/url] and [url=http://au3.php.net/manual/en/function.ziparchive-addfile.php]ZipArchive::AddFile[/url], of course, I could be wrong. Link to comment https://forums.phpfreaks.com/topic/25918-windows-zip-file-creation-from-system/#findComment-118378 Share on other sites More sharing options...
pnj Posted November 2, 2006 Author Share Posted November 2, 2006 Thanks, don't know how i missed the add function. I'll give it a try.On the original question about windows command line zip, any thoughts?I guess more people are on *nix...-p Link to comment https://forums.phpfreaks.com/topic/25918-windows-zip-file-creation-from-system/#findComment-118381 Share on other sites More sharing options...
trq Posted November 2, 2006 Share Posted November 2, 2006 [quote]I guess more people are on *nix...[/quote]Yeah sorry, winblows. Link to comment https://forums.phpfreaks.com/topic/25918-windows-zip-file-creation-from-system/#findComment-118399 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.