First of all:-
1. Do you want to read it using server script or..
2. Do you want to read it using client script.
I designed mine using client side. I did this using IE 6. First of all, this is an intranet application. User don't have access to the outside world. Hence, I ENABLED the security option in IE(I think it's the third option from the top under Internet Options (Click on security tab and then the custom level button).
I did not try this in netscape but I heard security is
pretty "intense" in Netscape. Like I said, this is an intranet app.
Anyways,
HERE IS MY SCRIPT (It returns one line at a time). It search for a number and return the string on the right. You might want to improvise it to your liking. Let me know if I could assist you further:-
function searchDeviceDescr(iDisabledCode) {
sDisabledCode = iDisabledCode.toString() + " ";
var deviceFSO = new ActiveXObject ("Scripting.FileSystemObject"

;
try {
var deviceTStream = deviceFSO.OpenTextFile ("C:\\somedirectory\\text.DAT"

;
while (! deviceTStream.AtEndOfStream) {
//read the text
var strLineText = deviceTStream.ReadLine();
if ((strLineText.substr(0, sDisabledCode.length)) == (sDisabledCode.substr(0, sDisabledCode.length))) {
//sResult contains the substring needed
var sResult = strLineText.substr(sDisabledCode.length, strLineText.length);
deviceTStream.Close();
return sResult;
}
}
deviceTStream.Close();
}
catch (ex){
alert("File Text.dat not found: " + ex);
}
}