2

I am trying to create a batch script that can remove a certain string from a text file. Eg. Here's what is looks like in text_file.txt:

test_time 1.4567s

test_time 2.1456s

test_time 1.45267s

I would like to remove "test_time" and the new_text_file.txt would look like this:

1.4567s
2.1456s
1.45267s

Any help would be appreciated.

cindy
  • 51
  • 1
  • 5
  • There is a batch file to do that here: http://stackoverflow.com/questions/5273937/how-to-replace-substrings-in-windows-batch-file – ConnorsFan Mar 12 '16 at 01:18

1 Answers1

2
for /f "tokens=2" %A in (text_file.txt) do Echo %A >> New__file.txt

See for /? for help. Use %%A in a batch file, %A if typing.