Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Sep 2013
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Batch script to remove columns from txt file

    Hello,

    I have a text file that has columns delimited using a pipe character ("|"). The csv has hundreds of columns, and I want to drop/remove column 3&4 and rest to be intact. How do i create a batch script that will create a new output.txt file.

    Text File: col1|col2|col3|col4|col5|col6|col7|....

    Output: col1|col2|col5|col6|col7|.....

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    10,004
    Thanks
    423
    Thanked 1,608 Times in 1,452 Posts
    Shakir,

    You should be able to figure it out from the answer to this thread.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Posting Permissions

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