er4se_
er4se_

Reputation: 13

How to print specific content of a command?

I need to list a lot of information from batch file in a txt file.

But, some commands give a "prefix" and only after, give the real information.

I need to print only the information, below have a wmic command where give a prefix before.

wmic /OUTPUT:C:\CPU.txt cpu get name

the output:

Name
Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz

I need only the second line, without the "Name", how I can do this?

Upvotes: 1

Views: 82

Answers (1)

npocmaka
npocmaka

Reputation: 57252

wmic cpu get name|find /v /i "name" > "C:\CPU.txt"

Upvotes: 2

Related Questions