waraq
Member
The scenario is this and please bear with me I'm learning this VS.NET 2005 and I'm trying to open a file with a name "SMDR(backup10-6-2007)" I create an instance of the file:
Dim NArchivos As String = Path.GetFullPath("..\..\SMDR(backup10-6-2007)")
Then I did my best to open the fila that exist but for some reason it saying that the file does not exist, and this is my statement:
The file is not corrupt or missing. The things is that is not finding the file.
Thank you for your help.
Willy
Dim NArchivos As String = Path.GetFullPath("..\..\SMDR(backup10-6-2007)")
Then I did my best to open the fila that exist but for some reason it saying that the file does not exist, and this is my statement:
VB.NET:
If File.Exists(NArchivos) = True Then
Dim Leer As StreamReader = File.OpenText(NArchivos)
txtSearch.Text = Leer.ReadToEnd
Leer.Close()
Buscar = CompareMethod.Text
Seleccionar = InStr(dtpEmpezar.Text, txtSearch.Text, Buscar) andalso InStr(dtpFinalizar.Text, txtSearch.Text, Buscar)
If Seleccionar = 0 Then
MsgBox("The Dates " & dtpEmpezar.Text & " and " & dtpFinalizar.Text & " was not found in the file.", 64, "Range Dates Not Found")
Exit Sub
End If
cobLista.Items.Add(Seleccionar - 1)
Else
MsgBox("File not found or may be corrupt.", 64, "File not found")
Exit Sub
End If
Thank you for your help.
Willy