cfmzipper.UnZip;
or
cfmzipper.UnZip();
On Tue, 2004-02-10 at 08:56, David Ashworth wrote:
> Hello,
>
> I have installed the component "aspZip.EasyZIP" that is used to unzip
> files, here is the code in ASP:
>
> const AddDirNames = 1
> const AddZipTime = 2
> const AddRecurseDirs = 4
> const AddHiddenFiles = 8
> const AddEncrypt = 16
> const AddSeparateDirs = 32
>
> dim ZIP, zipItem1
>
> set ZIP = server.createobject("aspZip.EasyZIP")
>
> Zip.Debug = true
> Zip.ZipFileName = Server.MapPath("Tcg_divi.zip")
> Zip.ArgsAdd("*.*")
> Zip.ExtrbaseDir = "D:\INETPUB\WWWROOT\ZIP\"
> Zip.ExtrOptions = 1
> Zip.UnZip
> response.Write "Files UnZipped=" & Zip.SuccessCNT & " with Error="&
> Zip.Error & " message=" & Zip.LastMessage
>
> However, I want to recreate this in Coldfusion, but keep running into
> errors, the code I have developed is as follows:
>
> <cftry>
> <cfobject action="" class="aspZip.EasyZIP" name="cfmzipper"
> type="com">
>
> <cfcatch>
> <cfobject action="" class="aspZip.EasyZIP" name="cfmzipper"
> type="com">
> </cfcatch>
>
> </cftry>
>
> <cfset AddDirNames = 1>
> <cfset AddZipTime = 2>
> <cfset AddRecurseDirs = 4>
> <cfset AddHiddenFiles = 8>
> <cfset AddEncrypt = 16>
> <cfset AddSeparateDirs = 32>
>
> <cfscript>
> cfmzipper.Debug = true;
> cfmzipper.ZipFileName = "D:\INETPUB\WWWROOT\ZIP\Tcg_divi.zip";
> cfmzipper.ArgsAdd("*.*");
> cfmzipper.ExtrbaseDir = "D:\INETPUB\WWWROOT\ZIP\";
> cfmzipper.ExtrOptions = 1;
> cfmzipper.UnZip;
> </cfscript>
>
>
> Now I know that the debug property etc are being recognised as if I
> change the name slightly, I am told that is not a recognised method.
>
> The error message I am getting is:
>
> Error Diagnostic Information
>
> The error occurred while processing an element with a general identifier
> of (CFSCRIPT), occupying document position (26:1) to (26:10) in the
> template file D:\INETPUB\WWWROOT\ZIP\test.cfm.
>
> Anyone know where I am going wrong?
>
> Thanks in advance
>
> Dave
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

