Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Unanswered: Updating a text file with asp

    i have a text file to read and parse, it is a feed of a massive size with some 250,000 lines.

    I know how to read the file and parse it but I am wondering if it is possible to read lets say the first 1000 lines, delete those first 1000 lines from the text file and do the same again several times until the file is empty.

    i work in ASP JS mostly, here is the script I have to go through each line.

    //Create a filesystem object
    var FSO = Server.CreateObject("Scripting.FileSystemObject")
    //Map the logical path to the physical system path
    //var Filepath = (Server.MapPath("feed/textfile.txt"));
    var Filepath = (Server.MapPath("feed/LSItitleTI.txt"));
    			//Open the file
      		var TextStream = FSO.OpenTextFile(Filepath)
    		for (i=0;TextStream.AtEndOfStream==false;i++)
    				//parse and add to the database
    Also, is there a way to know the number of lines in the file, i have tried with an array type but it did not work out for me.

    many thanks

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Look in to the "ReadLine" method.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts