Thursday, March 26, 2009

coding for reading text from file in javascript

note: It works only in IE

var fso = new ActiveXObject("Scripting.FileSystemObject");
var folderObj = fso.GetFolder("C:\\ctsi\\profile");
var fsoo=new Enumerator(folderObj.Files);
for(i=0;!fsoo.atEnd();fsoo.moveNext())
{
var filename=fsoo.item().name;
}

No comments: