Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for the Existence of a Directory
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00441072
Message ID:
00441152
Vues:
9
>Thanks,
>
>What does the DIR() function return if you pass it a string for a directory that doesn't exist? The help file wasn't very "helpful" with this scenario.

If the folder exist, the name of a file (contained in this folder) will be returned. If the folder doesn't exist, Dir returns an empty string (an empty string is also returned if the folder exist and has no file in it).

You could also try the ChDir function which will return a run-time error 76 if the folder does not exist.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform