Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone know of a way to check for valid path?
Message
From
01/03/1999 08:34:30
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00192165
Message ID:
00192601
Views:
16
>>>>does the following work as well?
>>>>
>>>>
>>>>mytest = lcPath + "\nul.txt"      && nul.txt should exist in every directory!
>>>>if file(mytest) then && dir exists
>>>>    copy file (myhappyfile) to (lcPath)
>>>>else
>>>>    md lcPath
>>>>    copy file (myhappyfile) to (lcPath)
>>>>endif
>>>>
>>>>
>>>
>>>Nope - just go to an NT box and check for "C:\nul.txt".
>>
>>Drop the ".txt" part and it works. In fact, you could also use other device names like CON, AUX, PRN etc.
>>?FILE("C:\NUL")
>>
>
>I think you'd better check on an NT system - FILE('C:\NUL') returns .F.
>
>VFP 6, NT 4.0 Build 1381, SP4, both WS and Server,

Oops, foot in mouth - should have known you had your reasons for that reply... :-)

Arne
Previous
Reply
Map
View

Click here to load this message in the networking platform