Learning ColdFusion 8: CFZip Part II - Zipping Files And Directories With CFZipParam

<!---
	Create a zip archive that contains the entire Data
	directory. We are going to use the CFZip's source
	attribute to put us in the correct base directory
	and then each child CFZipParam tag will use a source
	relative to that. We are going to overwrite any
	previously existing archive of the same name.
--->
<cfzip
	action="zip"
	file="#ExpandPath( './data.zip' )#"
	source="#ExpandPath( './data/' )#"
	overwrite="true">
 
	<!---
		Zip the entire documents directory. This
		will create a documents directory in the
		root of the archive.
	--->
	<cfzipparam
		source="./documents/"
		/>
 
	<!--- Zip one of the images into the archive root. --->
	<cfzipparam
		source="./images/funny.jpg"
		/>
 
	<!--- Zip one of the images into the archive root. --->
	<cfzipparam
		source="./images/mud_monster.jpg"
		/>
 
	<!--- Zip one of the images into the archive root. --->
	<cfzipparam
		source="./images/red_face.jpg"
		/>
 
	<!--- Zip one of the images into the archive root. --->
	<cfzipparam
		source="./images/smile.jpg"
		/>
 
</cfzip>

For Cut-and-Paste