Re: check for drive letter before copying files.
- From: GRAND_POOBAH <iss_boss.delete@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Apr 2007 09:51:44 -0400
The only thing I can see is the extra "End If" noted.
GP
--->
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 <------------------------------------------------------------ HERE
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: shrpshtr
- Re: check for drive letter before copying files.
- References:
- check for drive letter before copying files.
- From: shrpshtr
- check for drive letter before copying files.
- Prev by Date: Re: check for drive letter before copying files.
- Next by Date: Re: check for drive letter before copying files.
- Previous by thread: Re: check for drive letter before copying files.
- Next by thread: Re: check for drive letter before copying files.
- Index(es):