Project

General

Profile

$disk » History » Version 3

Per Amundsen, 08/13/2014 11:02 PM

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