Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - Checking to see if PATH exist?
Message
De
23/04/1997 12:22:54
 
 
À
23/04/1997 12:09:18
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00029243
Message ID:
00029412
Vues:
25
>>>>What is the function to check to see of the PATH is
>>>>really out there?
>>>
>>>There's a dirty old trick:
>>>if file("\nul")
>>>It should return .t. if the directory exists. Worked fine so far.
>>
>>Hi Dragan... thanks for the information...Would I code that:
>>
>>if FILE("C:\mypath\NUL")
>> etc...
>>endif
>>
>>and.. does the NUL mean something? Is it a VERB?
>
>The NUL file is an O/S default file handle that points to NOTHING. It is used for matters of definition and a place to send things that you want to "just go away".
>
>By definition, it always exists in the current directory, and always contains nothing.
>
>For example if you want to zip up a file.
>
>PKZIP ZIPFILE *.*
>
>Normally it shows the names that it zips because it is sending the names to the CON device (your console)
>
>If you want to save the list of files zipped, up you can re-direct to output to an ASCII file called ZIPLIST.TXT you could use...
>
>PKZIP ZIPFILE *.* > ZIPLIST.TXT
>
>If you want to do the zip, but keep the operation transparent to the user and dont need the list of zippped files for anything, you would re-direct the output to the NUL file...
>
>PKZIP ZIPFILE *.* >NUL
>
>It will still do the zip, the uses sees nothing and it is not stored
>____________________________________________________________________
>The problem in using FILE("C:\testdir\NUL") is that the operation varies between O/S's. On some O/S's any file name that ends in NUL is recognized as existing, for example the DOS command
>
>IF EXIST C:\SOMEDIR\NUL ECHO I EXIST
>
>will show "I EXIST", even if there is no directory called C:\SOMEDIR. I know that Novell's DOS v6.x does this and I think O/S2 does as well
>
>But for all O/S....
>
>IF EXIST .\NUL ECHO I EXIST
>
>will show "I EXIST"
>
>The discrepancy between O/S's makes the FILE("C:\testdir\NUL") command a poor choice, because on some O/S it will ALWAYS return .T.
>
>IMHO (In My Humble Opinion) Best stick with the DIRECTORY() function!


also, what are you doing for documenting your programs? All I care about
the the xref.lst to check my code. I guess one is suppose to use an
editor to read xref.lst. Does the Wizard only create to documents and
you find your own way to view what the Wizard Documentor created?
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform