Fichier en vb.net

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

  • Votes
  • Date
  • Date décroissante
  1. 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
    1. 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
      1. Bonjour,

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