Sample code for 30+ languages & platforms
AutoIt

Transition from Zip.AppendOneFileOrDir to Zip.AddFile

Provides instructions for replacing deprecated AppendOneFileOrDir method calls with AddFile.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oZip = ObjCreate("Chilkat.Zip")

; ...
; ...
Local $sLocalFilePath = "c:/someDir/example.dat"
Local $bSaveExtraPath = False

; ------------------------------------------------------------------------
; The AppendOneFileOrDir method is deprecated:

Local $oEntryObj = $oZip.AppendOneFileOrDir($sLocalFilePath,$bSaveExtraPath)
If ($oZip.LastMethodSuccess = False) Then
    ConsoleWrite($oZip.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

; ------------------------------------------------------------------------
; Do the equivalent using AddFile.

; Instead of returning the zip entry object, we just return success/failure.
$bSuccess = $oZip.AddFile($sLocalFilePath,$bSaveExtraPath)
If ($bSuccess = False) Then
    ConsoleWrite($oZip.LastErrorText & @CRLF)
    Exit
EndIf

; Do the following if you need the zip entry object for what was just appended.
; The newly appended entry is the last one.
$oZe = ObjCreate("Chilkat.ZipEntry")
Local $index = $oZip.NumEntries - 1
$oZip.EntryAt($index,$oZe)