customZipDirectory is a component that will zip up files in a given directory. To use it, just place the customZipDirectory.cfc file in the same directory as the rest of your code. To call it, follow the 2 lines of code in the example below.
Example Usage:
<!--- 1) Create a component ---> <cfobject component="CustomZipDirectory" name="myzip">
<!--- 2) Pass the 4 parameters to the CustomZipDirectory_ExecuteZip() function---> <!--- First parameter(string): the full path of directory to zip ---> <!--- Second parameter(string): the full path of the zip file ---> <!--- Third parameter(boolean): overwrite the zip file (in second parameter) if file already exist ---> <!--- Fourth parameter(boolean): include subFolders, zip all files in specified directory (in first parameter), and zip all files in subFolders --->
<cfset myzip.CustomZipDirectory_ExecuteZip(fullDirPath, fullzipFileName, overwriteZipFile, includeSubFolders)>
|