Results 1 to 2 of 2

Thread: VBScript for searching text

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2003
    Posts
    1

    VBScript for searching text

    Hi, can any one help me regarding the VB script.
    I have 2 text filesx,y. from first file x I need to read line by line and search if the second file Y is having this line? the problem is the second file contain large no. of data on each line and I need to find this tiny text in each line and if found I need to copy the entire line to a new text file. Can any one help????

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Use FileSystem Object.

    First copy the content of file x into an array, now loop therough each line of texts in file y and do a match, if the line match copy it to a new array or save the matched line to file z(open in append mode). That should solve your problem.

    If you need help with filesystem object, take a look here, they have a good faq. http://www.aspfaqs.com/aspfaqs/ShowCategory.asp?CatID=4


    Hope this helps.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

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



Click Here to Expand Forum to Full Width