check for drive letter before copying files.
- From: "shrpshtr" <shrpshtr@xxxxxxxxx>
- Date: 11 Apr 2007 22:23:04 -0700
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
.
- Follow-Ups:
- Re: check for drive letter before copying files.
- From: natemrice
- Re: check for drive letter before copying files.
- From: GRAND_POOBAH
- Re: check for drive letter before copying files.
- From: shrpshtr
- Re: check for drive letter before copying files.
- Prev by Date: VBS Script Troubleshooting
- Next by Date: IP address
- Previous by thread: VBS Script Troubleshooting
- Next by thread: Re: check for drive letter before copying files.
- Index(es):