title: windows batch wmic diskdrive get size where media type = Fixed hard disk media
body: <p>I need to get the size of locally installed hard disk/disks size via windows batch file,  please help</p>
  
  <pre><code>for /f ? %%f in ('wmic diskdrive where (MediaType='Fixed hard disk media') get size /value') do echo "%%f"
  </code></pre>