Is there a floppy in drive A ?

Hi,
I'd like to code to check if ther is a floppy in the drive A or B, and if there are others check up to do like if the file is there or i don't know.
Please code.
LVL 1
dosylAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mcriderConnect With a Mentor Commented:
   On Error Resume Next
    Err = 0
    x = Dir("A:\")
    If Not Err = 0 Then
        MsgBox "Insert a disk in drive A"
    End If


Cheers!
0
 
mcriderCommented:
Checking for a specific file once you know the diskette is in the drive:

    On Error Resume Next
    Err = 0
    x = Dir("A:\MYFILE.TXT")
    If Not Err = 0 Then
        MsgBox "Insert a disk in drive A"
    End If
    If x = "" Then
        MsgBox "File Not Found!"
    End If


Cheers!
0
 
dosylAuthor Commented:
The both comments are completed.
0
 
mcriderCommented:
Thanks for the points!  Glad I could help!


Cheers!
0
All Courses

From novice to tech pro — start learning today.