Serial numbers of the drivers to learn.
Use: /_hdd
alias _hdd {
$iif($com(dv),.comclose dv)
$iif($com(dv2),.comclose dv2)
var %s
.comopen dv Scripting.FileSystemObject
if ($comerr) return
noop $com(dv,drives,3,dispatch * dv2)
.comclose dv
if ($com(dv2)) {
%s = 1
:..
!echo -: $$comval(dv2,%s,path) $$comval(dv2,%s,serialnumber)
inc %s
goto ..
}
}
I'll disagree that the purpose is clear, the title has serial numbers in it. Which leads me to believe it'd return the serial numbers of my drives, but that's not what it returns. Is it some other type of serial number, since when I hear serial number I think of the unique number that identifies my physical hard drives.
SReject I get the following error from your code
Dean: It does.
pball: Code already gives the drivers like how many you have. for the explanation , there's nothing to explain, it's very simple code. I already wrote this code for a request by someone and I tought maybe someone would like to use it then I shared it. For the using code, you just have to " /_hdd " that's all.
Frenetic: This code could be usefull for anyone, also could be needed importantly. Maybe it does means nothings for you but, someone can use also love it anyway. Also, it can be workfull for using mirc with same people. Anyway thanks for this, such a un-identified comment.
SReject: Thanks for makin it more enjoyfull for u.
My version:
alias _hdd {
var %e, %b = 1
.comopen dv Scripting.FileSystemObject
if ($comerr) {
%e = Unable to create a FileSystemObject
}
elseif (!$com(dv,drives,3,dispatch * dv2)) {
%e = Unable to get drives from FileSystemObject
}
elseif ($com(dv2)) {
while ($comval(dv2,%b,path) $comval(dv2,%b,serialnumber) != $chr(32)) {
!echo -: $v1
inc %b
}
}
else {
%e = No drives found.
}
:error
if ($com(dv)) .comclose $v1
if ($com(dv2)) .comclose $v1
if ($iif(%e,$v1,$error)) {
!echo - Error: $v1
reseterror
}
}