Project

General

Profile

$disk » History » Version 7

Per Amundsen, 03/17/2016 05:16 PM

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