Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getfile question
Message
De
31/03/2000 16:02:44
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00353361
Message ID:
00353624
Vues:
17
>Question: IF a user doesn't select a file - but rather types in a non-existent file name - an error is generated. How should I verify that the filename they typed in (for the users that don't simply select the file) is a file that exists in the app directory.

To add a qualifier to Mark's suggestion...since FILE() will return .T. if the file lies anywhere on the path, you probably what to check with the explicit path that's allowed.

For example:

lcFile = GETFILE( [etc.])

lcTemp = JUSTFNAME( lcFile )
lcDir = ?sys(5)+sys(2003)+'\'

IF FILE( lcDir + lcTemp )
*!* Then you have a valid file
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform