Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anyone know of a way to check for valid path?
Message
De
01/03/1999 07:01:44
 
 
À
01/03/1999 06:23:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00192165
Message ID:
00192584
Vues:
17
>>>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,
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform