Assorted NT/2000/XP/.. CMD.EXE Script Tricks
From the html version of the tscmd.zip 1cmdfaq.txt file To the Description and the Index
This page is edited from the 1cmdfaq.txt faq-file contained in
mytscmd.zip
command line interface (CLI) collection. That zipped file has much
additional material, including a number of detached .cmd script
files. It is recommended that you also get the zipped version as a
companion.
117} 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
The output might be e.g.
C:\_D\TEST>cmdfaq
Memory = 511 MB
References/Comments:
(If a Google message link fails try the links within the brackets.)
Google Groups Apr 27 2010, 5:10 pm [M]
Google Groups Apr 27 2010, 5:16 pm [M]