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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to know if a network drive exist??? 1

Status
Not open for further replies.

Gert

Programmer
Apr 9, 2000
240
DO
Hi all,

How could i know if a network drive exist from VFP??

for example i can check if a DIRECTORY() EXISTE:

lconnection = DIRECTORY(mlcfolder)
if lconnection= .T.
set defau to (mlcfolder)
else
set default to (lcJustDir)
endif

i need to do the same with a network drive

thanks in advance???
 
Gert,

Check out the DriveType function:

? DRIVETYPE("c")

I know this function exists in VFP7 & VFP8, but I'm not sure about earlier versions.

Andy
 
soory, i'm using vfp5 and DRIVETYPE doesn't work with it
 
Gert,

Maybe DRIVETYPE was an old Foxtools function... I'm not sure.

Why can't you just use the DIRECTORY function and check for the root?

? DIRECTORY("C:\")
? DIRECTORY("F:\")
? DIRECTORY("J:\")

Andy
 
Indeed, in VFP 5 & 6 try:
Code:
set library to home()+"foxtools" additive
?drivetype("C:")
Instead of requiring WSH installed, all you need is FoxTools.FLL.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top