GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   server side zip tool? (https://gfy.com/showthread.php?t=681557)

Henrique 11-28-2006 12:34 PM

server side zip tool?
 
Hello, I got about 500 directories and I want zip all them, but each directory in a zip. it need looks like dir1.zip dir2.zip dir3.zip

Do u know any server side script/program that will do that?

Im under unix.

thanks,

QTbucks_Mark 11-28-2006 01:36 PM

From the top of my head:
Code:

for i in /where/those/directories/are/* ; do zip /output/path/$i.zip $i ; done
Adjust as needed... :winkwink:

quantum-x 11-28-2006 01:53 PM

Code:

<? foreach (glob('path/to/dir/*',GLOB_ONLYDIR) as $dir) {
      `zip -j $dir $dir/*`; } ?>

will do it in php


All times are GMT -7. The time now is 10:23 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123