Find & Delete lines in Text File

Author Message
rach

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 1/26/2012
  • Status: offline
Find & Delete lines in Text File Thursday, January 26, 2012 8:30 AM (permalink)
0
Hi,
I am newbie to vb scripting and need some help in creating a vb script. I want to delete the lines in the beginning of the file until I find a word "CUSTOMER_NAME". and When I find that particular word I have to quit and come out of the file.
 
Can any one point me in the right direction?
 
#1
    dm_4ever

    • Total Posts : 3687
    • Scores: 82
    • Reward points : 0
    • Joined: 6/29/2006
    • Location: Orange County, California
    • Status: offline
    Re:Find & Delete lines in Text File Thursday, January 26, 2012 11:15 AM (permalink)
    0
    Search keywords:
    FileSystemObject
    OpenTextFile
    InStr
    maybe RegEx (depending if the word can change and you need to match a pattern)
     
    That should get you started.
    dm_4ever

    My philosophy: K.I.S.S - Keep It Simple Stupid
    Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
    Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9