Fichier en vb.net

Fermé
njl - 6 avril 2010 à 00:56
holow1 Messages postés 680 Date d'inscription lundi 21 décembre 2009 Statut Membre Dernière intervention 7 décembre 2012 - 25 mai 2010 à 18:03
salut à tout.
svp je veux le code qui permet de verifier l'éxistence d'un fichier en vb.net et merci bien à l'avance

3 réponses

holow1 Messages postés 680 Date d'inscription lundi 21 décembre 2009 Statut Membre Dernière intervention 7 décembre 2012 71
6 avril 2010 à 15:59
Bonjour,



' Path est le chemin complet du fichier 
Private Function GetExtension(ByVal path As String) As String 
  Return New System.IO.FileInfo(path).Extension 
End Sub 


Pour plus d'informations ici

http://faqvbnet.developpez.com/?page=file#file_getFileExtension
0
Utilisateur anonyme
6 avril 2010 à 22:49
bonjour,

ca c'est pour trouver l'extension, mais pour verrifier l'existance ca serai ca:

If System.IO.File.Exists("path") Then
            MsgBox("path existe")
        End If
0
holow1 Messages postés 680 Date d'inscription lundi 21 décembre 2009 Statut Membre Dernière intervention 7 décembre 2012 71
25 mai 2010 à 18:03
Bonjour,

oui
http://faqvbnet.developpez.com/?page=file#file_getFileExtension
0