Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus
Message
De
15/05/2006 05:10:25
 
 
À
15/05/2006 05:05:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01121830
Message ID:
01121847
Vues:
10
>Not wishing to be impolite, I hesitate to suggest that you should take another look at the manual, and perhaps choose a function more suited to the task of determining, wheter or not a file is present on disk.
>
>There is no better function than adir() to check if a file exists or not. File() is not reliable, because it will search the complete path even though you specify another path. So file('c:\temp\myfile.txt') will return true even if c:\temp\myfile.txt does not exist, as long as myfile.txt if found in any directory in your path.

I prefer SYS(2000,[full path here]) > 0



>
>
>>Mohammed,
>>
>>I'm sorry - I was a bit hasty in my first answer.
>>
>>You should still look at your if...endif's, but also:
>>
>>Exactly what do you expect ADIR() to do for you in this context?
>>
>>Not wishing to be impolite, I hesitate to suggest that you should take another look at the manual, and perhaps choose a function more suited to the task of determining, wheter or not a file is present on disk.
>>
>>>hi all,
>>>
>>>i try to keep the Cursor at text1 if the file found,
>>>but it complate all the code.
>>>
>>>
>>>if adir(dummy,lcFile)>0
>>>        MESSAGEBOX(" file exists")
>>>        THISFORM.TEXT1.SetFocus()
>>>       * RETURN
>>>    else
>>>        COPY  TO (gcDelimName) XL5
>>>    ENDIF
>>> endif
>>>.
>>>.
>>>.
>>>.
>>>.
>>>
>>>
>>>thanks for help.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform