Para saber si un fichero existe o no solo tenemos que usar el metodo Exists de la clase System.IO.File
En el siguient ejemplo se muestra como usar el metodo:
Dim file_path as String
file_path = "c:/carpeta"
If System.IO.File.Exists(file_path & "\Form1.vb") Then
messagebox.show("Form1.vb exists","aviso")
Else
messagebox.show("Form1.vb No exists","aviso")
End If
No hay comentarios:
Publicar un comentario