AutoIt
AutoIt
Unzip Text File to String
See more Zip Examples
Demonstrates how to open a .zip and extract the 1st file (assuming it's a text file) to a string variable.Chilkat AutoIt Downloads
Local $bSuccess = False
; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oZip = ObjCreate("Chilkat.Zip")
$bSuccess = $oZip.OpenZip("qa_data/zips/EC16100.zip")
If ($bSuccess = False) Then
ConsoleWrite($oZip.LastErrorText & @CRLF)
Exit
EndIf
; Get the 1st file in the .zip
$oEntry = ObjCreate("Chilkat.ZipEntry")
$bSuccess = $oZip.EntryAt(0,$oEntry)
If ($bSuccess = False) Then
ConsoleWrite($oZip.LastErrorText & @CRLF)
Exit
EndIf
Local $sFileContents = $oEntry.UnzipToString(0,"utf-8")
ConsoleWrite($sFileContents & @CRLF)