Batch page 1 of 1 for 1 posts

Rob van der Woude has a nice batch script to get disk usage of folders & subfolders in Windows since there isn't a built-in function.  This could be similar to Linux du command.  @ECHO OFF :: Use local variables IF "%OS%"=="Windows_NT" SETLOCAL :: Check command line arguments and Windows version ECHO.%1 | FIND "/" >NUL IF NOT ERRORLEVEL 1 IF /I NOT "%~1"=="/L" GOTO Syntax ECHO.%1 | FIND "?" >NUL IF NOT ERRORLEVEL 1 GOTO Syntax ECHO.%1 | FIND "*" >NUL IF NOT ERRORLEVEL 1 Continue Reading...