DOS Batch file to pull certain info from a text file

Home Forums Scripting DOS Command Shell DOS Batch file to pull certain info from a text file

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    dspencer5
    Member
    #161268

    Guys,

    I’m having trouble getting a dos batch file to work correctly to pull only certain lines from a text document. I need it to read through a .txt file and copy the lines that have an O (oh) in the 14th field and a three character value in the 19th comma delimited field to a blank txt document. Example text is below. I appreciate any help I can get with this.

    “111111”,”02″,”111476″,”Customer1″,”xxS48″,”00153532601″,”111210″,”101110″,”1740.00″,”.00″,”011513″,”P”,2013-03-28 13:20,”S”,””,””,”044LP”,”111476″,”LAK”

    “222222”,”02″,”111089″,”Customer2″,”xx2584″,”00153270702″,”111610″,”081110″,”540.10″,”.00″,”092712″,”P”,2013-03-27 10:33,”O”,””,””,”044LP”,”111089″,”LAK”

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.