Link to home
Start Free TrialLog in
Avatar of sqlagent007
sqlagent007Flag for United States of America

asked on

(500 pts) VBS question How can I itterate through all drives on a server and return drive space skipping the CD ROM

I am trying to do a simple script that will itterate through all drives on a server and then return the capacity, so far i have most of it, but when it gets to the CD rom drive, I get drive not ready.

How can I tell my script to skip the CD rom drive? I tired an if statement like so:
'##########################################################
if oDrive.driveType <> 4 then
for each oDrive in oFSO.Drives
wscript.echo oDrive.DriveLetter & ": " & oDrive.TotalSize/1000000
next
end if

'#########################################################
Please help : )
ASKER CERTIFIED SOLUTION
Avatar of jphillips247
jphillips247

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sqlagent007

ASKER

NICE!!!!!