I need to get the size of locally installed hard disk/disks size via windows batch file, please help
for /f ? %%f in ('wmic diskdrive where (MediaType='Fixed hard disk media') get size /value') do echo "%%f"
You may want something like this:
@Echo Off
For /F "Skip=1 Delims=" %%A In (
'"WMIC LogicalDisk Where (DriveType='3') Get DeviceID, Size"'
) Do For /F "Tokens=1-2" %%B In ("%%A") Do Echo(%%B - %%C
Timeout -1