?
Solved

ColdFusion UnZip

Posted on 2003-03-06
6
Medium Priority
?
348 Views
Last Modified: 2013-12-24
What is a good utility to use as a com object for zipping or unzipping files with ColdFusion?
0
Comment
Question by:shfog
6 Comments
 
LVL 17

Expert Comment

by:anandkp
ID: 8081955
heard abt XCEEDZIP

its a DLL - install it & call it as a object from ur cfm code ...

let me know - if ur insterested doing this - so i can explain a bit more

K'Rgds
Anand
0
 

Author Comment

by:shfog
ID: 8082249
I am interested.
At this point I use WinZip called from a command line in VB 6.0.   I would like to move this process to the web page a files are uploaded.  I know that ColdFusion should be able to do this, but I can't find a way with WinZip, so far.
0
 
LVL 10

Expert Comment

by:substand
ID: 8082417
you can use

<CFEXECUTE
    NAME=" ApplicationName "
    ARGUMENTS="CommandLine Arguments"
    OUTPUTFILE="Output file name"
    TIMEOUT="Timeout interval in seconds">
    ...
</CFEXECUTE>

to use your winzip called from the command line

0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
LVL 17

Accepted Solution

by:
anandkp earned 400 total points
ID: 8085914
hi ok - u'll need to download the XceedZip.dll from internet & then use this code in ur application - to zip/unzip files/folders

PS : the files zipped using this DLL can be unzipped using the winzip tool as well ... so dont worry abt that !

<!---
For Zipping :
               ZipFolder          =      Source path               [ mandatory ]
               ZipName               =      File Name               [ mandatory ]

For UnZipping :
               UnZipFolder          =      Destination path     [ mandatory ]
               ZipName               =      File Name               [ mandatory ]
 --->

<CFOBJECT TYPE="COM" NAME="XZip" CLASS="XceedSoftware.XceedZip" ACTION="CREATE">

<!--- =============== TO ZIP ================================================= --->
<CFIF ISDEFINED("ZipFolder") AND ISDEFINED("ZipName")>
     <CFSET XZIP.ADDFILESTOPROCESS("#ZipFolder#*")>
     <CFSET XZIP.ZIPFILENAME = "#ZipName#">
     <CFSET XZIP.PROCESSSUBFOLDERS = "True">
     <CFSET X = XZIP.ZIP()>

<!--- ============== TO UNZIP =============================================== --->    
<CFELSEIF ISDEFINED("UnZipFolder") AND ISDEFINED("ZipName")>

     <CFSET XZIP.UNZIPTOFOLDER = "#UnZipFolder#">
     <CFSET XZIP.ZIPFILENAME = "#ZipName#">
     <CFSET X = XZIP.UNZIP()>

</CFIF>

K'Rgds
Anand
0
 

Author Comment

by:shfog
ID: 8088044
Thank you very much
0
 

Expert Comment

by:Michael_O
ID: 12257439
Hi,

I want to output extracted files to a query. I need to include File name, path, size, and extension.

Please help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
Suggested Courses

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question