Project

General

Profile

$disk » History » Version 8

Per Amundsen, 10/09/2016 12:38 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3 7 Per Amundsen
*$disk*
4
5
In /sysinfo [N:] and /diskinfo [N:] will return the drive letter [N:] used as parameter.
6
7 8 Per Amundsen
If the [N;] parameter is not defined, $disk will return $null.
8
9 7 Per Amundsen
----------------------------
10
11
_Added in 1.9.0_
12
13 1 Per Amundsen
*$disk(path|N)*
14
15
Returns information about the specified hard disk, where N = 0 for total available drives, and N > 0 to access each drive.
16
17 5 Per Amundsen
If no properties is defined, returns [[$true]] if hard disk exists, otherwise [[$false]].
18 1 Per Amundsen
19 6 Per Amundsen
_[[$disk]] with no parameters in /sysinfo [N:] and /diskinfo [N:] will return the drive letter [N:] used as parameter._
20 1 Per Amundsen
21
*Parameters*
22
23 4 Per Amundsen
path|N - The hard disk letter (C:) or the Nth hard disk.
24 1 Per Amundsen
25
*Properties*
26
27
.type - Type of hard disk. (unknown, norootdirectory, removable, fixed, network, cdrom, ram)
28
.free - Number of free bytes available.
29
.label - Label of the hard disk.
30
.size - Total number of bytes.
31 4 Per Amundsen
.unc - The "UNC":https://en.wikipedia.org/wiki/Uniform_Naming_Convention path for a network drive. (\\x.x.x.x\dir)
32 1 Per Amundsen
.path - The hard drive letter/path (C:\)
33
34
*Examples*
35
36
<pre>
37 4 Per Amundsen
; Print total number of hard drives.
38 1 Per Amundsen
echo -ag Total number of hard drives is $disk(0)
39
40 4 Per Amundsen
; Print some hard drive info of the first drive.
41 1 Per Amundsen
echo -ag The first hard drive is $bytes($disk(1).size).suf in size and have $bytes($disk(1).free).suf free space.
42
</pre>