get physical memory from the cmd

M

Matte

Hello.

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

Thankfull for any tips or info.

Regards.
 
J

Jerold Schulman

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
 
T

Timo Salmi

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
 
M

Matte

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top