Hi everyone,
my code is;
I need to read the text file saved in the string inspectionfile, How do I do this?
Thanks in advance...
ANSWER********************************
I posted a way to achieve the above yesterday but it had a glitch, here is a another solution that works better ( for me anyway)
my code is;
VB.NET:
[B]Dim programpath As String[/B]
[B]Dim inspectionfile As String[/B]
[B]programpath = My.Computer.FileSystem.ReadAllText("C:\InspPath.txt")[/B]
'the contents of insppath.txt is [B]c:\working\files [/B]
[B]inspectionfile = programpath + "\inspection.txt"[/B]
'the string inspectionfile reads [B]c:\working\files\inspection.txt[/B]
Thanks in advance...
ANSWER********************************
I posted a way to achieve the above yesterday but it had a glitch, here is a another solution that works better ( for me anyway)
VB.NET:
Dim programpath, inspfiletext As String
programpath = My.Computer.FileSystem.ReadAllText("c:\working\files\InspPath.txt")
My.Computer.FileSystem.CurrentDirectory = programpath
inspfiletext = My.Computer.FileSystem.ReadAllText("inspection")
Last edited: