$zip » History » Version 2
Per Amundsen, 06/28/2017 11:19 PM
1 | 1 | Per Amundsen | _Added in 2.9_ |
---|---|---|---|
2 | |||
3 | *$zip* |
||
4 | |||
5 | Returns the name of the zip operation during a [[on ZIP]] or [[on UNZIP]] event. |
||
6 | ___________________________ |
||
7 | |||
8 | *$zip(name, [N])* |
||
9 | |||
10 | Returns information about a zip/unzip item during a [[on ZIP]] or [[on UNZIP]] event. |
||
11 | |||
12 | _See also [[/zip]], [[$ziperr]], [[on ZIP]], [[on UNZIP]]._ |
||
13 | |||
14 | *Parameters* |
||
15 | |||
16 | name - Name of the zip/unzip operation. (can be a wildcard) |
||
17 | [N] - The Nth matches name. |
||
18 | |||
19 | *Properties* |
||
20 | |||
21 | .name - Returns the name of zip/unzip operation. |
||
22 | .src - Returns the source file or folder. |
||
23 | .dest - Returns the destination file or folder. |
||
24 | .ratio - Returns 0, 1 or 2 where 0 = no compression, 1 = fastest compression, 2 = optimal compression. |
||
25 | .unzip - Returns [[$true]] if this is a unzip operation, otherwise [[$false]]. |
||
26 | |||
27 | *Example* |
||
28 | |||
29 | <pre> |
||
30 | ; Zip the entire adiirc folder into 'adiirc.zip' |
||
31 | //zip name $qt($adiircdir) adiirc.zip |
||
32 | |||
33 | ; Print the zip result when then zip operation is finished. |
||
34 | 2 | Per Amundsen | on *:ZIP:echo -ag zipped $zip($zip).src into $zip($zip).dest status: $iif($ziperr,fail,ok) |
35 | 1 | Per Amundsen | </pre> |