- May 23, 2002
- 16,928
- 8
- 81
OK, here's the scenario.
I need to get the uptime from around 2300 computers we have. I can use the systeminfo /s command to get it but it takes like 15 seconds per computer. If I just run through a list it's going to take over 8 hours.
I have a TXT file with all the computer names that need to be checked and just run it through a for loop.
I thought of two other possibilities.
1) If there's a way to have it kick off other commands while waiting for the first one to come back, that would be great. But I don't know that that's possible.
2) I can split the job up into multiple batch files and have them each run a subset of the data. I don't want to have multiple source files though so maybe if I can have the for loop read in every other line or every 4th line, I can just set one to start at 1 then jump to 5, one to start at 2 and jump to 6, etc. However I don't know how to make them read in every X line.
Anyone have any other ideas for me?
I need to get the uptime from around 2300 computers we have. I can use the systeminfo /s command to get it but it takes like 15 seconds per computer. If I just run through a list it's going to take over 8 hours.
I have a TXT file with all the computer names that need to be checked and just run it through a for loop.
Code:
for /f %%A in (ids.txt) do (
systeminfo /s %%A)
I thought of two other possibilities.
1) If there's a way to have it kick off other commands while waiting for the first one to come back, that would be great. But I don't know that that's possible.
2) I can split the job up into multiple batch files and have them each run a subset of the data. I don't want to have multiple source files though so maybe if I can have the for loop read in every other line or every 4th line, I can just set one to start at 1 then jump to 5, one to start at 2 and jump to 6, etc. However I don't know how to make them read in every X line.
Anyone have any other ideas for me?
