say 'Could not find server' server 'on domain' domain'.'
say 'Error ' myRc'.'
call DropLsRxutFuncs
exit 9
end
If srvDiskInfo.0 = 0 then do
say 'No server disk drives'
call DropLsRxutFuncs
exit 0
end
if length(drive) > 2 then call usage
if length(drive) = 2 & substr(drive, 2,1) <> ':' then call usage
if length(drive) = 2 & substr(drive, 2,1) = ':' then drive = left(drive,1)
Srvname = '\\'||server
parse value Sysdrivemap(,'free') with freedrive .
'@net use 'freedrive Srvname'\'drive||'$ 2>&1 | rxqueue'
parse pull NetError ':' .
if left(NetError, 3) = 'NET' then
do
call lineout, ''
call lineout, 'Drive'||bright drive ||normal 'is a back-up tape, is non-formatted, or doesn''t exist...'
'@ECHO Y 2>&1 | net use 'freedrive '/d 1>NUL 2>NUL'
exit
end
'@rxqueue /clear'
parse value SysDriveInfo(freedrive) with . freespace totalspace driveid
say
if freespace == 0 then
do
call lineout, 'Drive'||bright drive||normal 'is a CD-ROM.'
'@ECHO Y 2>&1 | net use 'freedrive '/d 1>NUL 2>NUL'
exit
end
if freespace <> '' then
call lineout, 'Drive'||bright drive||normal 'has in total'|| bright Right(Format(totalspace/1048576,,0),5) normal|| 'MB, of which' bright Right(Format(freespace/1048576,,0),4) normal || 'MB is free.'
else call lineout, 'Drive 't 'is not a valid drive.'
'@ECHO Y 2>&1 | net use 'freedrive '/d 1>NUL 2>NUL'
call lineout output, bright||'Total'||normal' occupied space on domain'||bright domain ||normal' is'bright Right(Format(totalspacedomain/1048576,,0),8)||normal 'MB.'
call lineout output, bright||'Total'||normal' free space on domain'||bright domain ||normal' is 'bright||othergreen Right(Format(totalfreespacedomain/1048576,,0),8)||normal 'MB.'
end
else
do
call lineout output, 'Total occupied space on domain' domain 'is' Right(Format(totalspacedomain/1048576,,0),8) 'MB.'
call lineout output, 'Total free space on domain' domain 'is ' Right(Format(totalfreespacedomain/1048576,,0),8) 'MB.'