If one is talking Windows, there's a ton of simple ways you can get drive info:
Note that I've set some of the above to give just bare bone information, whereas other examples give more details. The fsutil command will even give you listings of mapped drives, if you need those, while powershell can tell you everything under the sun, if you just care enough to give it the proper parameters and such.
Note 2: Some of these return unicode names, and will appear to be with an extra space between each letter. You can filter that out easily enough, if interested.
Code: (Select All)
Screen _NewImage(1024, 720, 32)
Shell _Hide "cmd /c wmic logicaldisk get name >temp.txt"
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, file$
Print file$
Loop
Close
Sleep
Shell _Hide "cmd /c wmic logicaldisk get caption >temp.txt"
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, file$
Print file$
Loop
Close
Sleep
Shell _Hide "cmd /c wmic logicaldisk get deviceid, volumename, description >temp.txt"
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, file$
Print file$
Loop
Close
Sleep
Shell _Hide "cmd /c fsutil fsinfo drives >temp.txt"
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, file$
Print file$
Loop
Close
Sleep
Shell _Hide "powershell get-psdrive -psprovider filesystem >temp.txt "
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, file$
Print file$
Loop
Close
Sleep
Note that I've set some of the above to give just bare bone information, whereas other examples give more details. The fsutil command will even give you listings of mapped drives, if you need those, while powershell can tell you everything under the sun, if you just care enough to give it the proper parameters and such.
Note 2: Some of these return unicode names, and will appear to be with an extra space between each letter. You can filter that out easily enough, if interested.