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.

1

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.