Project

General

Profile

$zip » History » Version 4

Per Amundsen, 05/24/2018 10:06 AM

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