get physical memory from the cmd

  • Thread starter Thread starter Matte
  • Start date Start date
M

Matte

Hello.

Is it possible to get the physical memory from the cmd?

Thankfull for any tips or info.

Regards.
 
Hello.

Is it possible to get the physical memory from the cmd?

Thankfull for any tips or info.

Regards.
See tip 0985 » Freeware tool returns physical memory in batch.
in the 'Tips & Tricks' at http://www.jsifaq.com


See tip 8296 » Freeware MemCheck displays memory statistics and can commit and lock memory.
You can parse the output in a FOR command:

for /f "Tokens=1* Delims=," %%a in ('memcheck^|find "TOTAL:"') do (
if not defined mem set mem=%%b
)
for /f "Tokens=1" %%a in ('@echo %mem%) do (
set /a mem=%%a
)


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
Matte said:
Is it possible to get the physical memory from the cmd?

@echo off & setlocal enableextensions
for /f "tokens=4,5" %%a in (
'systeminfo^|find "Total Physical Memory"') do (
set memory_=%%a
set units_=%%b)
echo Memory = %memory_% %units_%
endlocal & goto :EOF

All the best, Timo
 
Thanks for all the tips and help.


Timo Salmi said:
@echo off & setlocal enableextensions
for /f "tokens=4,5" %%a in (
'systeminfo^|find "Total Physical Memory"') do (
set memory_=%%a
set units_=%%b)
echo Memory = %memory_% %units_%
endlocal & goto :EOF

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:[email protected] <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Useful script files and tricks ftp://garbo.uwasa.fi/pc/link/tscmd.zip
 
Back
Top