Archived Forum Post

Index of archived forum posts

Question:

Perl Zip module vs Zip Com Object

Feb 25 '16 at 16:03

The Perl native Chilkat Zip works perfectly.

Calling the same using the COM object works to zip files, but unzip does not work.

######### Works!

$zip = Win32::OLE->new('Chilkat_9_5_0.Zip');
if (! $zip) {
print Win32::OLE->LastError() . "n";
exit;
}
$success = $zip->UnlockComponent("*****");
if ($success != 1) {
print $zip->lastErrorText() . "n";
exit;
}

################## Works!

my $oo = Win32::OLE->new('Zip.Object');
$cm->Comment("--Zip DLL return code " . Win32::OLE->LastError(),1);
my $zip = $oo->New;
if (! $zip)
{
die "Error instating class Archive::Zip";
}

ExtractInto fails.
$tdir = 'C:\temp;
$success = $zip->OpenZip($zipFile);
if (!$success)
{ $f->errorText($zip->lastErrorText());
return -7;
}
$no = $zip->ExtractInto($tdir);
$f->errorText("[$no] " . $zip->lastErrorText());

File Log I set verbose property to 1,but error shows 0.

02/25/2016 14:42:52: Start GlobalScape_FERRET D20160225T144251P9120SDR V92 [SFTP] [10.241.0.91] [9613] 02/25/2016 14:42:52: [TEST] [ALAMO] [File.ZIP] [D:ftpdataALAMO] 02/25/2016 14:42:52:--Sleep DLL return code 0 02/25/2016 14:42:53:-[3]- 02/25/2016 14:42:53:Move to the Backup Folder [D:ftpdataALAMOFile.ZIP]-[\fnb.cfbi.localdataappsftpftpdlKOLKHORSTdataALAMO_D20160225T144251P9120SDR_File.ZIP] 02/25/2016 14:42:53:STATS: 9,613 bytes 1 Seconds Rate:93.877 Kbps 02/25/2016 14:42:54:--Zip DLL return code 0 02/25/2016 14:42:54:ALAMO:File.ZIP Zip Extract Member Failure 02/25/2016 14:42:54:Cannot extract \fnb.cfbi.localdataappsftpftpdlKOLKHORSTdataALAMO_D20160225T144251P9120SDR_File.ZIP [] 02/25/2016 14:42:54:[] ChilkatLog:

OpenZip:
DllDate: Dec 29 2015
ChilkatVersion: 9.5.0.55
UnlockPrefix: FROSTBZIP
Username: DR-2K3GSFTP01:dbloader
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
openZip:
zipPath: \fnb.cfbi.localdataappsftpftpdlKOLKHORSTdataALAMO_D20160225T144251P9120SDR_File.ZIP oemCodePage: 437
openFromMemData:
numCentralDirEntries: 1
szCentralDir: 88
posCentralDir: 9503
--openFromMemData
timeToOpenMillisec: Elapsed time: 32 millisec
--openZip
Success.
--OpenZip
--ChilkatLog

02/25/2016 14:42:54: Stop GlobalScape_FERRET D20160225T144251P9120SDR