Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Checking if a Floppy Drive is ready using FileSystemObject library

Total Hit ( 3423)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


The Microsoft Scripting Runtime Library offers a FileSystemObject and a Drive object that allow you to check if a Floppy drive is ready. Before writing the code you have to add this library to your project using the References dialog window. If the library isn't contained in the list, you can download it from Microsoft web site at www.microsoft.com/scripting.

With the FileSystemObject's GetDrive method you get a reference to a Drive object that points to the drive you've specified. Test the drive state through IsReady property. Here's a very compact function that contains all the code you need:

Click here to copy the following block
' Test whether a drive is ready
Function IsDriveReady(sDrive As String) As Boolean
  Dim fso As New FileSystemObject
  IsFloppyDriveReady = fso.GetDrive(sDrive).IsReady
End Function


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.