computing
  • 22

Batch File To Remove Characters In a Txt File

  • 22

Hey guys,

I’ve seen lots of postings on this subject, but none that matches my requirement. So:

I have a text file where lines look like this one:

E1532 C1010 A0000 52112 10 89332.182 80687.132 89332.182 86450.499

I would need a batch script (Windows XP) that removes the letters and leaves only the numerical characters. String are “tab” delimited, so I would like for the “tabs” to still remain in there (later import in another application).

Given that the file has thousands of lines, and that I can only use batch scripting, any help would be greately apreciated.

Thanks a lot.

Share

1 Answer

  1. Are the letters always in cols 1, 7 &13?

    oops
    … your tabs got trashed.

    Are the letters always in the same columns?

    Does the line look like this?

    E1532	C1010	A0000	52112	10	89332.182	80687.132	89332.182	86450.499
    

    =====================================
    Helping others achieve escape felicity

    M2

    • 0