I'm using the below code to output the current free space on the C: Drive. How can I convert the output from bytes to GB using batch?
@echo off
for /f "usebackq delims== tokens=2" %%x in (`wmic logicaldisk where "DeviceID='C:'" get FreeSpace /format:value`) do set FreeSpace=%%x
echo %FreeSpace%
See Question&Answers more detail:os