Where am I going wrong. I want to read “textfile.txt”. If I hardcode it, it craps out.
Currently the below pops up a requestor and I select the file, reads correctly. If I force it and tell it the specific file, it fails at textinputstream.open.
Where am I going wrong?
var f As FolderItem
Var textInput As TextInputStream
Var rowFromFile As String
f = FolderItem.ShowOpenFileDialog(“text/plain”)
If f <> nil and f.exists Then
textInput = TextInputStream.Open(f)
textInput.Encoding = Encodings.UTF8
rowFromFile = textInput.ReadLine
if rowFromFile.left(6) = “dbloc=” then
gdbLocation = rowFromFile.right(len(rowfromfile) - 6)
Loop Until textInput.EndOfFile
msgbox(“File not found.”)