Make A Php Script Zip Files In A Folder
I have a php scipt called rename.php than runs as a cron job evey night. “rename.php” renames current folders to include today’s date (“Front” becomes “Front_2011_06_19″; “Games” becomes “Games_2011_06_19″ etc) and then creates a new folder “Front” and “Games” for tomorrow’s files to be stored in.
The files stored in the folders are photo snapshots from IP cameras that are stored on server but the number of files is getting too much and ziping each day’s photos when I rename will significantly lessen how many files are stored on the server while still allowing me a chance to view them later on.
I need someone to modify this php scripts so that before it renames the folder each night, it will zip all the files (photos) in each folder into 1 zip file, delete all the individual files, then rename the folder and create a new one to get ready for tomorrow.
rename.php attached



