|
|
Title | See if the floppy drive is empty |
Keywords | floppy, drive, empty |
Categories | Tips and Tricks |
|
|
Use Dir$. If the drive is empty, the program gets a "Bad file name or number" error.
Note that this assumes you know the floppy drive letter.
|
|
Private Sub Command1_Click()
Dim txt As String
Screen.MousePointer = vbHourglass
DoEvents
On Error Resume Next
txt = Dir$("A:\*.*")
If Err.Number = 52 Then
Label1.Caption = "Drive is empty"
Else
Label1.Caption = "Drive is not empty"
End If
Screen.MousePointer = vbDefault
End Sub
|
|
Formatted by
Neil Crosby
|
|
|
|
|
|