Is Drive Ready

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Is Drive Ready

Post by Marcus Tettmar » Fri Jan 20, 2006 2:26 pm

A function to determine whether a drive is ready (e.g. for CDROM drives and removeable drives etc).

VBSTART
Function IsDriveReady(drv)
Dim fso, d, s, t
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(drv)
IsDriveReady = d.IsReady
End Function
VBEnd
VBEval>IsDriveReady("E"),isready
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts