>Hi everybody,
>
>I’am having a problem and I’m seeking some help. Here is the problem :
>
>Using Foxpro 2.6 for Windows, I’m testing the presence of a directory using the file( ) function, like this :
>
>
if file(‘c:\nul’)
> ? "Directory C:\ exist"
>else
> ? "Directory C:\ does’nt exist"
>endif
>
>It works on Windows 95, but it does'nt on WIndows NT Workstation. The file( ) function with a directory passed as parameters seems to always return false.
>
>I know that the file system is different in Windows NT Workstation. Can somebody help me to overcome this problem.
>
>tia
You might have to do it at a low-level file/open process by trying to create a bogus file.
lcTest = "C:\MyDir\BogusFile.txt"
lnHandle = fcreate( lcTest )
llDirOk = lnHandle > 0
if lnHandle > 0
fclose( lnHandle )
erase( lcTest )
endif
be sure to use a bogus filename because if it did have anything of value, it would be erased.