Jump to content

Detect disc


Kivin
 Share

Recommended Posts

Does DriveStatus() not do what you want?

DriveStatus ( "path" )

Return Value

Value ....... Interpretation

UNKNOWN ....... Drive may be unformatted (RAW).

READY ....... Typical of hard drives and drives that contain removable media.

NOTREADY ....... Typical of floppy and CD drives that do not contain media.

INVALID ....... May indicate the drive letter does not exist or that a mapped network drive is inaccessible.

Edited by ChrisL
Link to comment
Share on other sites

  • 3 weeks later...

Hi I can't get it working

I want to exclude a floppy but include all other , the following code will only exclude the floppy when nog floppy is inserted

CODE
Func DriveInfo()

$DriveList = "|"

$drive_set1 = DriveGetDrive("ALL")

for $i = 1 to $drive_set1[0]

$DriveType = DriveGetType($drive_set1[$i]) ;

if $DriveType = "Fixed" or ($DriveType = "Removable" and $DriveStatus <> "NOTREADY") or $DriveType = "RAMDisk" then

$DriveStatus = DriveStatus($drive_set1[$i])

$drive_set1[$i] = StringUpper($drive_set1[$i])

$DriveList = $DriveList & $drive_set1[$i] & "|"

GUICtrlSetData ($List_d1,$DriveList,$drive_set1[1])

endif

next

EndFunc

Could someone help me

Thnx

Emiel

Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...