check for drive letter before copying files.



hey all,

script newbie here and i am banging my head against my keyboard trying
to figure this one out. i am sure it is easy to all of the guru's
here. what i am trying to do is check to see if an assigned drive
letter (i: in this case) exists before i allow a script to copy data
to it. if it doesn't i want the script to continue as planned, if it
doesn't i want the script to prompt the end user to insert his/her usb
drive. i know there has to be a way to do it so any help would be
greatly appreciated. thanks in advance...

here is what i have so far.



Dim objfso, msg, i

drv = "i"
Set objfso = CreateObject("Scripting.FileSystemObject")
If objfso.DriveExists(drv) Then
End If
Set i = objfso.GetDrive(drv)
If i.IsReady Then
Else
msg = "Please plug USB drive into laptop..."
End If
Else
msg = "Please plug USB drive into laptop..."
End If
Set objShell = CreateObject("Wscript.Shell")
objshell.Popup msg, AUTO_ANSWER, "Insert USB Drive", OK_Button

.