Skip navigation

JSI Tip 0985. Freeware tool returns physical memory in batch.

Downloads
memory.zip

Download memory.zip.

When you type:

memory.exe

at a command prompt, it returns:

Physical memory is nnnnnnnnn bytes

To use the number of bytes in a batch, call memory.bat instead, which sets the arithmetic environment variable memory.

memory.bat contains:

@echo off
for /f "Tokens=1-5 Delims= " %%i in ('memory.exe') do set /a memory=%%l

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish