Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The file( ) function and Windows NT Workstation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00174822
Message ID:
00174846
Vues:
27
>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
  */ Ok to create the file, close it
  fclose( lnHandle )
  erase( lcTest )
endif
be sure to use a bogus filename because if it did have anything of value, it would be erased.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform