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

computer driver ?

Status
Not open for further replies.

kitnba

MIS
Jul 31, 2000
132
HK
How can I detect the computer have the F: or not ?
I want to check the computer is in network or not, and then If have network, I will use the f:\file otherwise will use the c:\files.
After I login novell, I will map the driver F for the sever. If I in home, I will not have the driver F only have driver c.

Can I do that?
 
Hi!

Use DIRECTORY() function:
directoy('C:\') = .T.
directory('Q:\') = .F. && does not exists.


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
But In VFP3.0 can't have this command ? but VFP6 is ok

If I am 3.0, how ?
 
Hi!

Hmm, try to trap error and access this directory by some means. For example:

local llError, lcOldError
lcOldError = ON("ERROR")
ON ERROR m.llError = .T.
m.llError = .F.

create table ("F:\aaa") (IDDF I)
if !m.llError && no error occurred
&& clean up it
use in aaa
erase ("F:\aaa.dbf")
endif

&& restore error handler
ON ERROR &lcOldError
&& now llError contains .T. if F:\ does not exists.

Hope this works, did not tried its but you should get an general idea.


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top