Dronaman
Dronaman

Reputation: 1

How to find the number of cores in a windows computer using a batch file

I've been searching for a while but I have not had any luck finding the answer I need. I already know how to use %OS% and %PROCESSOR_ARCHITECTURE% but I've had no avail. I'm not looking for super complex coding examples, and I know there's one that are just like the ones stated above. (To be honest, I can't remember the game that had it!) Anyway. If you guys know it, I'd appreciate the help.

Upvotes: 0

Views: 417

Answers (2)

Alex
Alex

Reputation: 917

it's a system var: %NUMBER_OF_PROCESSORS%

Upvotes: 2

bkane521
bkane521

Reputation: 386

in windows: wmic cpu get NumberOfCores works for me or in linux: nproc

Upvotes: 0

Related Questions