www.webdeveloper.com
Results 1 to 2 of 2

Thread: searching with asp

  1. #1
    Join Date
    Nov 2003
    Location
    albany
    Posts
    104

    searching with asp

    Anybody have any info on getting asp to search a text file. I need a script or something that will find all instances of a word. I was sure file system object would do that and have found some great articles on file system object but nothing on doing this. I can search drives,dir, and folders but not text. Is this something I would be better off doing with javascript.

  2. #2
    Join Date
    Apr 2003
    Location
    Manchester
    Posts
    23
    Basically you should use the file system object and loop through every line in a text file. While looping through each line, try and use something like the following to search what you are looking for:

    If InStr(1,theTextFileRow,SearchWord,1) Then
    add result to array
    End If

    Read this to help you explain inStr:

    http://www.w3schools.com/vbscript/func_instr.asp

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles