Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for a file
Message
De
06/10/1998 06:55:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/10/1998 06:49:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00144148
Message ID:
00144153
Vues:
24
>I am trying to verify if a file is present on the disk. I have tried FILE() but it also checks along the path and returns true if it finds the file anywhere. If I have a full file name how can I verify that it is present on the disk?
>
>Thanks
John,
File() is not thrustable all the time. Instead you might try :
handle=fopen(cFilename)
if handle > 0
   =fclose(handle)
   return .t.
endif
return ferror()
This would return .t. if file found and accessible otherwise an error code indicating why cannot be opened (ie: exists but not accessible).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform