January 08th 2004 zip on the fly

zip on the fly

From: zip on the fly

------=_NextPart_000_026B_01C3D631.73210030 Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

If you are running CFMX you can take advantage of the java.io class and run=
the following function. If you are running a earlier version of CF you wil=
l probably need to get a copy of a CFX tag such as by Ben Forta.





function zip(zipPath,toZip){
//make a fileOutputStream object to put the ZipOutputStream into
...
From: zip on the fly

------=_NextPart_000_002E_01C3D631.FED0BC60 Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Sweet Code Snippet Todd!!! This is really good stuff!

Thanks,

Jeff

_____

From: Todd Kingham [mailto:toddkingham@yahoo.invalid]
From: zip on the fly

------=_NextPart_000_000D_01C3D67E.83FB1740 Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

I pray you had that saved and didn't type that in the email. :-D

Thx a lot! That's a gang load of code. I'll go through it l8r.
From: zip on the fly

For quick zip operations on a Windows machine, I use a simple utility called FBZip (http://www.freebyte.com/fbzip/). It is freeware and has a command line interface that works great with CFEXECUTE.

If you are on a non Windows environment or do not have CFEXECUTE enable on your server, then Todd's JAVA code is the ticket.
From: zip on the fly

------=_NextPart_000_0003_01C3D75E.7EE76F20 Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Todd I ran the script (adjusted it a lil') and it worked perfect!



Thx...

John C. Bland II
From: zip on the fly

------=_NextPart_000_0293_01C3D7D1.BACD9DC0 Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Cool,

Good to hear that it worked for you.

FYI, you can also zip the contents of a directory by leaving off the file n=
From: zip on the fly

------=_NextPart_000_001F_01C3D86F.E77E2800 Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Yeah, that's what I changed. :-D

John C. Bland II
JDEV Inc.
Business: http://www.jdevinc.com