tak google řiká něco takového:
:kBytesFree drive ret -- returns the free space of a drive in kilobytes
:: -- drive [in] - drive letter, default is c:
:: -- ret [out,opt] - varref returns number of bytes free
:$source http://www.DosTips.com
SETLOCAL
SET drive=%~1
IF "%drive%"=="" SET drive=C:
FOR /f "tokens=3 delims= " %%a in ('"dir %drive%\|find "bytes free""') do set free=%%a
SET free=%free:,=%& rem eleminate commas in number
SET free=%free:.=%& rem eleminate commas in number
SET free=%free:~0,-3%& rem divide by 1000 by cutting off the last 3 digits
( ENDLOCAL & REM RETURN VALUES
IF "%~2" NEQ "" (SET %~2=%free%) ELSE echo.%free%
)
EXIT /b %ERRORLEVEL%
mě to ošem nefunguje...(asi tam bude chtít změnin to bytes free za volných bajtů a jiné upravy)