#include-once #include "corzShared.au3" ; ZipWin.au3 v0.2.0 ; Zipping and Unzipping with Windows ; TEST ; ; FILE ; local $ret = ZipWin("B:\Test\PS3 Baby_360p [2021-03-31].mkv", "B:\Test\baby.zip") ; debug("ZipWin =>" & $ret & "<=", @ScriptLineNumber, 1);debug ; $ret = UnzipWin("B:\Test\baby.zip", "B:\Test\OUT") ; debug("UnzipWin =>" & $ret & "<=", @ScriptLineNumber, 1);debug ; ; DIR ; local $ret = ZipWin("B:\Test\ffe", "B:\Test\ffe.zip") ; debug("ZipWin =>" & $ret & "<=", @ScriptLineNumber, 1);debug ; $ret = UnzipWin("B:\Test\ffe.zip", "B:\Test\OUT") ; debug("UnzipWin =>" & $ret & "<=", @ScriptLineNumber, 1);debug func ZipWin($source_item, $target_zip) debug("source_item =>" & $source_item & "<=", @ScriptLineNumber, 1);debug debug("target_zip =>" & $target_zip & "<=", @ScriptLineNumber, 1);debug if not FileExists($source_item) then debug("Error: $source_item does not exist", @ScriptLineNumber, 1);debug return SetError(1, 0, false) endif if FileExists($target_zip) then local $delete_result = FileDelete($target_zip) debug("delete_result =>" & $delete_result & "<=", @ScriptLineNumber, 1);debug endif local $is_directory = StringInStr(FileGetAttrib($source_item), "D") > 0 debug("is_directory =>" & $is_directory & "<=", @ScriptLineNumber, 1);debug local $clean_source = $source_item if StringRight($clean_source, 1) = "\" or StringRight($clean_source, 1) = "/" then $clean_source = StringTrimRight($clean_source, 1) endif local $parent_dir = "" local $item_name = "" local $delimiter_index = StringInStr($clean_source, "\", 0, -1) if $delimiter_index > 0 then $parent_dir = StringLeft($clean_source, $delimiter_index - 1) $item_name = StringTrimLeft($clean_source, $delimiter_index) else $parent_dir = "." $item_name = $clean_source endif debug("parent_dir =>" & $parent_dir & "<=", @ScriptLineNumber, 1);debug debug("item_name =>" & $item_name & "<=", @ScriptLineNumber, 1);debug ; 1. Windows 10 (1803+), Windows 11, Server 2019+: Native tar.exe (Synchronous) local $tar_exe = @SystemDir & "\tar.exe" local $tar_exists = FileExists($tar_exe) debug("tar_exists =>" & $tar_exists & "<=", @ScriptLineNumber, 1);debug if $tar_exists then local $tar_command = StringFormat('"%s" -a -cf "%s" -C "%s" "%s"', $tar_exe, $target_zip, $parent_dir, $item_name) debug("tar_command =>" & $tar_command & "<=", @ScriptLineNumber, 1);debug local $tar_exit = RunWait($tar_command, "", @SW_HIDE) debug("tar_exit =>" & $tar_exit & "<=", @ScriptLineNumber, 1);debug local $tar_zip_created = FileExists($target_zip) debug("tar_zip_created =>" & $tar_zip_created & "<=", @ScriptLineNumber, 1);debug if $tar_exit = 0 and $tar_zip_created then debug("Exit status: Method 1 (tar.exe) succeeded", @ScriptLineNumber, 1);debug return true endif endif ; 2. Windows 8+ and Windows 7 with .NET 4.5+: In-process .NET ZipFile (Synchronous) local $ps_dotnet_command = "" if $is_directory then $ps_dotnet_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Add-Type -Assembly System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::CreateFromDirectory('%s', '%s')""", $source_item, $target_zip) else $ps_dotnet_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Add-Type -Assembly System.IO.Compression.FileSystem; $zip = [System.IO.Compression.ZipFile]::Open('%s', 'Create'); [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($zip, '%s', '%s'); $zip.Dispose()""", $target_zip, $source_item, $item_name) endif debug("ps_dotnet_command =>" & $ps_dotnet_command & "<=", @ScriptLineNumber, 1);debug local $ps_dotnet_exit = RunWait($ps_dotnet_command, "", @SW_HIDE) debug("ps_dotnet_exit =>" & $ps_dotnet_exit & "<=", @ScriptLineNumber, 1);debug local $ps_dotnet_zip_created = FileExists($target_zip) debug("ps_dotnet_zip_created =>" & $ps_dotnet_zip_created & "<=", @ScriptLineNumber, 1);debug if $ps_dotnet_exit = 0 and $ps_dotnet_zip_created then debug("Exit status: Method 2 (.NET ZipFile) succeeded", @ScriptLineNumber, 1);debug return true endif ; 3. Windows 10/11 or Windows 7 with WMF 5.0+: PowerShell Compress-Archive (Synchronous) local $ps_archive_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Compress-Archive -LiteralPath '%s' -DestinationPath '%s' -Force""", $source_item, $target_zip) debug("ps_archive_command =>" & $ps_archive_command & "<=", @ScriptLineNumber, 1);debug local $ps_archive_exit = RunWait($ps_archive_command, "", @SW_HIDE) debug("ps_archive_exit =>" & $ps_archive_exit & "<=", @ScriptLineNumber, 1);debug local $ps_archive_zip_created = FileExists($target_zip) debug("ps_archive_zip_created =>" & $ps_archive_zip_created & "<=", @ScriptLineNumber, 1);debug if $ps_archive_exit = 0 and $ps_archive_zip_created then debug("Exit status: Method 3 (Compress-Archive) succeeded", @ScriptLineNumber, 1);debug return true endif ; 4. Stock Windows 7 RTM Fallback: Shell.Application COM debug("Executing Method 4 (Shell.Application COM fallback)...", @ScriptLineNumber, 1);debug local $empty_zip_header = Binary("0x504B0506000000000000000000000000000000000000") local $file_handle = FileOpen($target_zip, 18) ; 2 (Write) + 16 (Binary) debug("file_handle =>" & $file_handle & "<=", @ScriptLineNumber, 1);debug if $file_handle = -1 then return SetError(2, 0, false) local $write_result = FileWrite($file_handle, $empty_zip_header) debug("write_result =>" & $write_result & "<=", @ScriptLineNumber, 1);debug FileClose($file_handle) local $shell_object = ObjCreate("Shell.Application") local $shell_is_obj = IsObj($shell_object) debug("shell_is_obj =>" & $shell_is_obj & "<=", @ScriptLineNumber, 1);debug if not $shell_is_obj then return SetError(3, 0, false) local $zip_folder = $shell_object.NameSpace($target_zip) local $zip_folder_is_obj = IsObj($zip_folder) debug("zip_folder_is_obj =>" & $zip_folder_is_obj & "<=", @ScriptLineNumber, 1);debug if not $zip_folder_is_obj then return SetError(4, 0, false) $zip_folder.CopyHere($source_item, 4 + 16) local $final_zip_created = FileExists($target_zip) debug("final_zip_created =>" & $final_zip_created & "<=", @ScriptLineNumber, 1);debug debug("Exit status: Method 4 (Shell.Application) reached", @ScriptLineNumber, 1);debug return true endfunc func UnzipWin($source_zip, $destination_dir) debug("source_zip =>" & $source_zip & "<=", @ScriptLineNumber, 1);debug debug("destination_dir =>" & $destination_dir & "<=", @ScriptLineNumber, 1);debug if not FileExists($source_zip) then debug("Error: $source_zip does not exist", @ScriptLineNumber, 1);debug return SetError(1, 0, false) endif if not FileExists($destination_dir) then local $dir_created = DirCreate($destination_dir) debug("dir_created =>" & $dir_created & "<=", @ScriptLineNumber, 1);debug endif ; 1. Windows 10 (1803+), Windows 11, Server 2019+: Native tar.exe (Synchronous) local $tar_exe = @SystemDir & "\tar.exe" local $tar_exists = FileExists($tar_exe) debug("tar_exists =>" & $tar_exists & "<=", @ScriptLineNumber, 1);debug if $tar_exists then local $tar_command = StringFormat('"%s" -xf "%s" -C "%s"', $tar_exe, $source_zip, $destination_dir) debug("tar_command =>" & $tar_command & "<=", @ScriptLineNumber, 1);debug local $tar_exit = RunWait($tar_command, "", @SW_HIDE) debug("tar_exit =>" & $tar_exit & "<=", @ScriptLineNumber, 1);debug if $tar_exit = 0 then debug("Exit status: Method 1 (tar.exe) succeeded", @ScriptLineNumber, 1);debug return true endif endif ; 2. Windows 8+ and Windows 7 with .NET 4.5+: In-process .NET ZipFile (Synchronous) local $ps_dotnet_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Add-Type -Assembly System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory('%s', '%s')""", $source_zip, $destination_dir) debug("ps_dotnet_command =>" & $ps_dotnet_command & "<=", @ScriptLineNumber, 1);debug local $ps_dotnet_exit = RunWait($ps_dotnet_command, "", @SW_HIDE) debug("ps_dotnet_exit =>" & $ps_dotnet_exit & "<=", @ScriptLineNumber, 1);debug if $ps_dotnet_exit = 0 then debug("Exit status: Method 2 (.NET ZipFile) succeeded", @ScriptLineNumber, 1);debug return true endif ; 3. Windows 10/11 or Windows 7 with WMF 5.0+: PowerShell Expand-Archive (Synchronous) local $ps_archive_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Expand-Archive -LiteralPath '%s' -DestinationPath '%s' -Force""", $source_zip, $destination_dir) debug("ps_archive_command =>" & $ps_archive_command & "<=", @ScriptLineNumber, 1);debug local $ps_archive_exit = RunWait($ps_archive_command, "", @SW_HIDE) debug("ps_archive_exit =>" & $ps_archive_exit & "<=", @ScriptLineNumber, 1);debug if $ps_archive_exit = 0 then debug("Exit status: Method 3 (Expand-Archive) succeeded", @ScriptLineNumber, 1);debug return true endif ; 4. Stock Windows 7 RTM Fallback: Shell.Application COM debug("Executing Method 4 (Shell.Application COM fallback)...", @ScriptLineNumber, 1);debug local $shell_object = ObjCreate("Shell.Application") local $shell_is_obj = IsObj($shell_object) debug("shell_is_obj =>" & $shell_is_obj & "<=", @ScriptLineNumber, 1);debug if not $shell_is_obj then return SetError(2, 0, false) local $zip_folder = $shell_object.NameSpace($source_zip) local $zip_folder_is_obj = IsObj($zip_folder) debug("zip_folder_is_obj =>" & $zip_folder_is_obj & "<=", @ScriptLineNumber, 1);debug local $target_folder = $shell_object.NameSpace($destination_dir) local $target_folder_is_obj = IsObj($target_folder) debug("target_folder_is_obj =>" & $target_folder_is_obj & "<=", @ScriptLineNumber, 1);debug if not $zip_folder_is_obj or not $target_folder_is_obj then return SetError(3, 0, false) endif $target_folder.CopyHere($zip_folder.Items(), 4 + 16) debug("Exit status: Method 4 (Shell.Application) reached", @ScriptLineNumber, 1);debug return true endfunc ; 100% working, ConsoleWrite #cs func ZipWin($source_item, $target_zip) ConsoleWrite("(" & @ScriptLineNumber & ") $source_item: =>" & $source_item & "<=" & @CrLf) ConsoleWrite("(" & @ScriptLineNumber & ") $target_zip: =>" & $target_zip & "<=" & @CrLf) if not FileExists($source_item) then ConsoleWrite("(" & @ScriptLineNumber & ") Error: $source_item does not exist." & @CrLf) return SetError(1, 0, false) endif if FileExists($target_zip) then local $delete_result = FileDelete($target_zip) ConsoleWrite("(" & @ScriptLineNumber & ") $delete_result: =>" & $delete_result & "<=" & @CrLf) endif local $is_directory = StringInStr(FileGetAttrib($source_item), "D") > 0 ConsoleWrite("(" & @ScriptLineNumber & ") $is_directory: =>" & $is_directory & "<=" & @CrLf) local $parent_dir = "" local $item_name = "" if $is_directory then $parent_dir = $source_item $item_name = "." else local $delimiter_index = StringInStr($source_item, "\", 0, -1) if $delimiter_index > 0 then $parent_dir = StringLeft($source_item, $delimiter_index - 1) $item_name = StringTrimLeft($source_item, $delimiter_index) else $parent_dir = "." $item_name = $source_item endif endif ConsoleWrite("(" & @ScriptLineNumber & ") $parent_dir: =>" & $parent_dir & "<=" & @CrLf) ConsoleWrite("(" & @ScriptLineNumber & ") $item_name: =>" & $item_name & "<=" & @CrLf) ; 1. Windows 10 (1803+), Windows 11, Server 2019+: Native tar.exe (Synchronous) local $tar_path = @SystemDir & "\tar.exe" local $tar_exists = FileExists($tar_path) ConsoleWrite("(" & @ScriptLineNumber & ") $tar_exists: =>" & $tar_exists & "<=" & @CrLf) if $tar_exists then local $tar_command = StringFormat('"%s\tar.exe" -a -cf "%s" -C "%s" "%s"', @SystemDir, $target_zip, $parent_dir, $item_name) ConsoleWrite("(" & @ScriptLineNumber & ") $tar_command: =>" & $tar_command & "<=" & @CrLf) local $tar_exit = RunWait($tar_command, "", @SW_HIDE) ConsoleWrite("(" & @ScriptLineNumber & ") $tar_exit: =>" & $tar_exit & "<=" & @CrLf) local $tar_zip_created = FileExists($target_zip) ConsoleWrite("(" & @ScriptLineNumber & ") $tar_zip_created: =>" & $tar_zip_created & "<=" & @CrLf) if $tar_exit = 0 and $tar_zip_created then ConsoleWrite("(" & @ScriptLineNumber & ") Exit status: Method 1 (tar.exe) succeeded." & @CrLf) return true endif endif ; 2. Windows 8+ and Windows 7 with .NET 4.5+: In-process .NET ZipFile (Synchronous) local $ps_dotnet_command = "" if $is_directory then $ps_dotnet_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Add-Type -Assembly System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::CreateFromDirectory('%s', '%s')""", $source_item, $target_zip) else $ps_dotnet_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Add-Type -Assembly System.IO.Compression.FileSystem; $zip = [System.IO.Compression.ZipFile]::Open('%s', 'Create'); [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($zip, '%s', '%s'); $zip.Dispose()""", $target_zip, $source_item, $item_name) endif ConsoleWrite("(" & @ScriptLineNumber & ") $ps_dotnet_command: =>" & $ps_dotnet_command & "<=" & @CrLf) local $ps_dotnet_exit = RunWait($ps_dotnet_command, "", @SW_HIDE) ConsoleWrite("(" & @ScriptLineNumber & ") $ps_dotnet_exit: =>" & $ps_dotnet_exit & "<=" & @CrLf) local $ps_dotnet_zip_created = FileExists($target_zip) ConsoleWrite("(" & @ScriptLineNumber & ") $ps_dotnet_zip_created: =>" & $ps_dotnet_zip_created & "<=" & @CrLf) if $ps_dotnet_exit = 0 and $ps_dotnet_zip_created then ConsoleWrite("(" & @ScriptLineNumber & ") Exit status: Method 2 (.NET ZipFile) succeeded." & @CrLf) return true endif ; 3. Windows 10/11 or Windows 7 with WMF 5.0+: PowerShell Compress-Archive (Synchronous) local $ps_archive_command = "" if $is_directory then $ps_archive_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Compress-Archive -Path '%s\*' -DestinationPath '%s' -Force""", $source_item, $target_zip) else $ps_archive_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Compress-Archive -LiteralPath '%s' -DestinationPath '%s' -Force""", $source_item, $target_zip) endif ConsoleWrite("(" & @ScriptLineNumber & ") $ps_archive_command: =>" & $ps_archive_command & "<=" & @CrLf) local $ps_archive_exit = RunWait($ps_archive_command, "", @SW_HIDE) ConsoleWrite("(" & @ScriptLineNumber & ") $ps_archive_exit: =>" & $ps_archive_exit & "<=" & @CrLf) local $ps_archive_zip_created = FileExists($target_zip) ConsoleWrite("(" & @ScriptLineNumber & ") $ps_archive_zip_created: =>" & $ps_archive_zip_created & "<=" & @CrLf) if $ps_archive_exit = 0 and $ps_archive_zip_created then ConsoleWrite("(" & @ScriptLineNumber & ") Exit status: Method 3 (Compress-Archive) succeeded." & @CrLf) return true endif ; 4. Stock Windows 7 RTM Fallback: Shell.Application COM ConsoleWrite("(" & @ScriptLineNumber & ") Executing Method 4 (Shell.Application COM fallback)..." & @CrLf) local $empty_zip_header = Binary("0x504B0506000000000000000000000000000000000000") local $file_handle = FileOpen($target_zip, 18) ; 2 (Write) + 16 (Binary) ConsoleWrite("(" & @ScriptLineNumber & ") $file_handle: =>" & $file_handle & "<=" & @CrLf) if $file_handle = -1 then return SetError(2, 0, false) local $write_result = FileWrite($file_handle, $empty_zip_header) ConsoleWrite("(" & @ScriptLineNumber & ") $write_result: =>" & $write_result & "<=" & @CrLf) FileClose($file_handle) local $shell_object = ObjCreate("Shell.Application") local $shell_is_obj = IsObj($shell_object) ConsoleWrite("(" & @ScriptLineNumber & ") $shell_is_obj: =>" & $shell_is_obj & "<=" & @CrLf) if not $shell_is_obj then return SetError(3, 0, false) local $zip_folder = $shell_object.NameSpace($target_zip) local $zip_folder_is_obj = IsObj($zip_folder) ConsoleWrite("(" & @ScriptLineNumber & ") $zip_folder_is_obj: =>" & $zip_folder_is_obj & "<=" & @CrLf) if not $zip_folder_is_obj then return SetError(4, 0, false) if $is_directory then local $source_folder = $shell_object.NameSpace($source_item) local $source_folder_is_obj = IsObj($source_folder) ConsoleWrite("(" & @ScriptLineNumber & ") $source_folder_is_obj: =>" & $source_folder_is_obj & "<=" & @CrLf) if not $source_folder_is_obj then return SetError(5, 0, false) $zip_folder.CopyHere($source_folder.Items(), 4 + 16) else $zip_folder.CopyHere($source_item, 4 + 16) endif local $final_zip_created = FileExists($target_zip) ConsoleWrite("(" & @ScriptLineNumber & ") $final_zip_created: =>" & $final_zip_created & "<=" & @CrLf) ConsoleWrite("(" & @ScriptLineNumber & ") Exit status: Method 4 (Shell.Application) reached." & @CrLf) return true endfunc func UnzipWin($source_zip, $destination_dir) ConsoleWrite("(" & @ScriptLineNumber & ") $source_zip: =>" & $source_zip & "<=" & @CrLf) ConsoleWrite("(" & @ScriptLineNumber & ") $destination_dir: =>" & $destination_dir & "<=" & @CrLf) if not FileExists($source_zip) then ConsoleWrite("(" & @ScriptLineNumber & ") Error: $source_zip does not exist." & @CrLf) return SetError(1, 0, false) endif if not FileExists($destination_dir) then local $dir_created = DirCreate($destination_dir) ConsoleWrite("(" & @ScriptLineNumber & ") $dir_created: =>" & $dir_created & "<=" & @CrLf) endif ; 1. Windows 10 (1803+), Windows 11, Server 2019+: Native tar.exe (Synchronous) local $tar_exe = @SystemDir & "\tar.exe" local $tar_exists = FileExists($tar_exe) ConsoleWrite("(" & @ScriptLineNumber & ") $tar_exists: =>" & $tar_exists & "<=" & @CrLf) if $tar_exists then local $tar_command = StringFormat('"%s" -xf "%s" -C "%s"', $tar_exe, $source_zip, $destination_dir) ConsoleWrite("(" & @ScriptLineNumber & ") $tar_command: =>" & $tar_command & "<=" & @CrLf) local $tar_exit = RunWait($tar_command, "", @SW_HIDE) ConsoleWrite("(" & @ScriptLineNumber & ") $tar_exit: =>" & $tar_exit & "<=" & @CrLf) if $tar_exit = 0 then ConsoleWrite("(" & @ScriptLineNumber & ") Exit status: Method 1 (tar.exe) succeeded." & @CrLf) return true endif endif ; 2. Windows 8+ and Windows 7 with .NET 4.5+: In-process .NET ZipFile (Synchronous) local $ps_dotnet_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Add-Type -Assembly System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory('%s', '%s')""", $source_zip, $destination_dir) ConsoleWrite("(" & @ScriptLineNumber & ") $ps_dotnet_command: =>" & $ps_dotnet_command & "<=" & @CrLf) local $ps_dotnet_exit = RunWait($ps_dotnet_command, "", @SW_HIDE) ConsoleWrite("(" & @ScriptLineNumber & ") $ps_dotnet_exit: =>" & $ps_dotnet_exit & "<=" & @CrLf) if $ps_dotnet_exit = 0 then ConsoleWrite("(" & @ScriptLineNumber & ") Exit status: Method 2 (.NET ZipFile) succeeded." & @CrLf) return true endif ; 3. Windows 10/11 or Windows 7 with WMF 5.0+: PowerShell Expand-Archive (Synchronous) local $ps_archive_command = StringFormat("powershell.exe -NoProfile -NonInteractive -Command ""$ErrorActionPreference='Stop'; Expand-Archive -LiteralPath '%s' -DestinationPath '%s' -Force""", $source_zip, $destination_dir) ConsoleWrite("(" & @ScriptLineNumber & ") $ps_archive_command: =>" & $ps_archive_command & "<=" & @CrLf) local $ps_archive_exit = RunWait($ps_archive_command, "", @SW_HIDE) ConsoleWrite("(" & @ScriptLineNumber & ") $ps_archive_exit: =>" & $ps_archive_exit & "<=" & @CrLf) if $ps_archive_exit = 0 then ConsoleWrite("(" & @ScriptLineNumber & ") Exit status: Method 3 (Expand-Archive) succeeded." & @CrLf) return true endif ; 4. Stock Windows 7 RTM Fallback: Shell.Application COM ConsoleWrite("(" & @ScriptLineNumber & ") Executing Method 4 (Shell.Application COM fallback)..." & @CrLf) local $shell_object = ObjCreate("Shell.Application") local $shell_is_obj = IsObj($shell_object) ConsoleWrite("(" & @ScriptLineNumber & ") $shell_is_obj: =>" & $shell_is_obj & "<=" & @CrLf) if not $shell_is_obj then return SetError(2, 0, false) local $zip_folder = $shell_object.NameSpace($source_zip) local $zip_folder_is_obj = IsObj($zip_folder) ConsoleWrite("(" & @ScriptLineNumber & ") $zip_folder_is_obj: =>" & $zip_folder_is_obj & "<=" & @CrLf) local $target_folder = $shell_object.NameSpace($destination_dir) local $target_folder_is_obj = IsObj($target_folder) ConsoleWrite("(" & @ScriptLineNumber & ") $target_folder_is_obj: =>" & $target_folder_is_obj & "<=" & @CrLf) if not $zip_folder_is_obj or not $target_folder_is_obj then return SetError(3, 0, false) endif $target_folder.CopyHere($zip_folder.Items(), 4 + 16) ConsoleWrite("(" & @ScriptLineNumber & ") Exit status: Method 4 (Shell.Application) reached." & @CrLf) return true endfunc #ce