Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FILE() and file at the root
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00529793
Message ID:
00529817
Vues:
10
>I am using FILE() with a full path and a full file name. It works great unless the file is located directly under the root. FILE('C:\upload.txt') will return .T. as long as upload.txt is in the path. It does not matter that c:\upload.txt does not exist.
>
>Is this known behavior for FILE()? What are my other options?

This is a known bug and is as such in the MS KB.

I have a wrapper called filex.prg and I use this code in it:
LPARAMETERS tcFile
LOCAL lcPath,llFile,lcFIle

lcFile=ALLTRIM(tcFile)

lcPath=SET("PATH")
SET PATH TO 
llFile=FILE(lcFile)
SET PATH TO (lcPath)
RETURN llFile
hth,
Frank Camp
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform