Is this, by any chance, the output of the systeminfo command? Was Razor2.3's solution, using VBScript, not good enough for you? If you use the systeminfo command, that will give you the answer you want, but it does a lot more than just check memory and therefore takes a long time to run (by comparison, Razor's VBScript is almost instantaneous.) Anyway, here's the solution:
@echo off set ans=Total Physical Memory: 3,326 MB echo Parsing the string "%ans%": for /f "tokens=1-5" %%a in ("%ans%") do ( echo Word 1: %%a echo Word 2: %%b echo Word 3: %%c echo Word 4: %%d echo Word 5: %%e )
Thanks this is what I am after and would prefer to have it as a batch script. The only issue now is getting the "Total Physical Memory: 3,326 MB" by running : systeminfo | Find "Total Physical Memory" into a variable. So I thought I could do this:
set MEMORY=systeminfo | Find "Total Physical Memory" which would set the value "Total Physical Memory: 3,326 MB" into the %MEMORY% variable but this doesnt work. So esentially this script would run the systeminfo command, parse for the line I am after and then store this in a variable all from the same script. The issue is get the value of the systeminfo command into a variable from the same script...
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE