I just need to know how I can access the CurrentDirectory. It's in C:\Users\Me\My Documents\VS2008\Projects\DES\input.txt, it won't always be that exact one so how do I get it to recognize where it is. I tryed Googleing it but I'm getting no where.
Try
Using sr As StreamReader = New StreamReader(WHAT DO I NEED HERE + "input.txt")
Dim line As String
Do
line = sr.ReadLine()
'I'm outputting to a text box and I'll be doing more to it later.
txtInput.Text = txtInput.Text + vbCrLf + line
Loop Until line Is Nothing
End Using
Catch ex As Exception
MsgBox("Invalid Input File", MsgBoxStyle.Exclamation, "ERROR")
End Try
Question
mitchartz
I just need to know how I can access the CurrentDirectory. It's in C:\Users\Me\My Documents\VS2008\Projects\DES\input.txt, it won't always be that exact one so how do I get it to recognize where it is. I tryed Googleing it but I'm getting no where.
Try Using sr As StreamReader = New StreamReader(WHAT DO I NEED HERE + "input.txt") Dim line As String Do line = sr.ReadLine() 'I'm outputting to a text box and I'll be doing more to it later. txtInput.Text = txtInput.Text + vbCrLf + line Loop Until line Is Nothing End Using Catch ex As Exception MsgBox("Invalid Input File", MsgBoxStyle.Exclamation, "ERROR") End TryLink to comment
Share on other sites
3 answers to this question
Recommended Posts