Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drive A

Status
Not open for further replies.

aliane

Programmer
Mar 20, 2002
6
DZ
Please.
One can tell me how I can test the existence of drive A
thanks
 
You could use this:
Code:
Local lnReturn
lnReturn = DRIVETYPE("a:")
IF lnReturn = 2
  messagebox("There is an 'A' drive")
ELSE
  messagebox("There is NO 'A' drive")
ENDIF

 
Thanks for reponse
but I want to know if the floppy is in the drive A: and it's good to use it.
Merci
 
Ok that is a different question. Try this:

ON ERROR do nodisk
COPY FILE c:\Testdisk.txt to a:\testdisk.txt

FUNCTION nodisk
messagebox("There is no disk in the 'a' drive"+chr(13)+;
"Or it it write protected")
ENDFUNC
 
try the diskspace command. If the disk is not in the drive it returns -1, otherwise it returns the free space on disk. No need to build a seperate error routine, just check the return value. Attitude is Everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top