Project

General

Profile

Zip » History » Version 8

Per Amundsen, 02/16/2023 05:10 PM

1 1 Per Amundsen
_Added in 2.9_
2
3 5 Per Amundsen
*/zip [-oculN] <name> <source> <target>*
4 1 Per Amundsen
5
Zips a file or folder into a zip file or unzips a zip file into a folder.
6
7
_See also [[$zip]], [[$ziperr]], [[on ZIP]], [[on UNZIP]]._
8
9 3 Per Amundsen
_Only available with .NET 4.5+_
10
11 1 Per Amundsen
*Switches*
12
13 8 Per Amundsen
table(ktable).
14
|*Switch*|*Description*|
15
| -o | Overwrites the target zip file if it exists or overwrites existing files in the target unzip folder. |
16
| -c | Aborts the zip/unzip operation. |
17
| -u | Unzip instead of zip. |
18
| -lN | Use compression method N, 0 = no compression, 1 = fastest compression, 2 = optimal compression. |
19
| -i | Prints the open zip operations, if combined with -u prints the open unzip operations. |
20 1 Per Amundsen
21 6 Per Amundsen
*Parameters*
22 1 Per Amundsen
23 8 Per Amundsen
table(ktable).
24
|*Parameter*|*Description*|
25
| <name> | Name of the zip/unzip operation. |
26
| <source> | The source file or folder to zip or the source zip file to unzip. |
27
| <target> | The target zip file to zip to, or the target folder to unzip to. |
28 1 Per Amundsen
29
*Example*
30
31
<pre>
32
; Zip the entire adiirc folder into 'adiirc.zip'
33
//zip name $qt($adiircdir) adiirc.zip
34
35
; Print the zip result when then zip operation is finished.
36 7 Per Amundsen
on *:ZIP:name:echo -ag zipped $zip($zip).src into $zip($zip).dest status: $iif($ziperr,fail,ok)
37 1 Per Amundsen
</pre>