How to know if a disk unit is connected?.
Posted: Fri Dec 05, 2014 1:22 pm
Hi,
I've searched on the forum about this question, and no results.
I need to connect a Virtual disk in a unit selected by user, but previously I need to know if this unit is connected.
My approach is:
It's possible to check without Examinedirectory(), only with a test like "if FileSize" or so?
I've tried it with Filesize(mid(units,n,1) + ":\.") and it seems not run.
Regards
I've searched on the forum about this question, and no results.
I need to connect a Virtual disk in a unit selected by user, but previously I need to know if this unit is connected.
My approach is:
Code: Select all
Units.s = "DEFGHIJKLMNOPQRSTUVWXYZ"
for n=1 to len(units)
chku.s = mid(units,n,1) + ":\"
if ExamineDirectory(0, chku, "*.*")
; unit is connected
FinishDirectory(0)
else
; unit is NOT connected
I've tried it with Filesize(mid(units,n,1) + ":\.") and it seems not run.
Regards