Readfile has me confused

Function btnimport2_onclick()
  Dim filename
filename="c:/qcogo/don.txt"
req=ReadFile(filename)
If req.status=200 Or req.status = 0 Then
  MsgBox req.responseText
Else
  MsgBox "File could not be read"
End If
End Function

Above is the code I am using to read a file so that I can parse it with other code. It is composed of only numbers and will eventually end up in localstorage if I can figure out how to do it.
When I run it, I get either "File cannot be read’ or “OK” depending upon req status being 200 or 0 200 for first message and 0 for the second. The first message is self-explanatory but don’t know what OK means in this context. Help or advice will be appreciated. Incidentally, this is the first time I have had any experience with Readfile.

ReadFile can read a file in the current project, as in

  filename="datafile.txt"
  req=ReadFile(filename)

where datafile.txt is in the project itself.

It can’t go read any file it wants on the user’s system - that would be a wild security problem.

1 Like

Thank you. That makes sense.