Zend certified PHP/Magento developer

Displaying free space on a partition – batch script

I’d like the free space to be in GB, not MB. How could I change that?

for /f "tokens=3" %%a in ('dir c:') do (
    set bytesfree=%%a
)
set bytesfree=%bytesfree:,=%
echo Free space on partition C: [%bytesfree%] B
endlocal && set bytesfree=%bytesfree%