>>>>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!
In the May, 1997 FoxPro advisor, Ted Roche has an article that describes how to test if a disk is in a floppy drive. During testing, he discovered that the NUL file does not work in NT 4.0.
Craig
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer