With my code I am getting the folder size in GB with no decimal places. But I need it in GB with having a decimal point and 2 decimal places.
@echo off
for /F "tokens=*" %%a IN ('"dir C:\Users\rinni.abraham\Desktop\fresh %1 /s /-c | find "bytes" | find /v "free""') do set summaryout=%%a
for /f "tokens=1,2 delims=)" %%a in ("%summaryout%") do set filesout=%%a&set sizeout=%%b
set sizeout=%sizeout:bytes=%
set sizeout=%sizeout: =%
echo Size is: %sizeout%
pause
set /a sizeout=%sizeout%/1049
set /a sizeout=%sizeout%/1024
This is my output:
Size is: 2gb
I would like the output as:
Size is: 2.03 gb