<http://www.netikka.net/tsneti/info/tscmd117.htm>
Copyright © 2003-2010 by Prof. Timo Salmi  
Last modified Tue 27-Apr-2010 19:14:24

 
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 my tscmd.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.

Please see "The Description and the Index page" for the conditions of usage and other such information.



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]