I would like to know that how we can check the available memory in batch script? Is there any method already available? If it is not possible in batch script then is there any other way by which we can get the memory available?
OS: Windows XP / Windows 7
Alternative:
C:\>wmic os get freephysicalmemory
FreePhysicalMemory
4946576
to parse out to a variable (wmic output has a header + extra line on the end)
for /f "skip=1" %%p in ('wmic os get freephysicalmemory') do (
set m=%%p
goto :done
)
:done
echo free: %m%
free: 4948108
(freevirtualmemory
is available also)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With