https://www.voidtools.com/support/everything/command_line_interface/
CalcFolderSize.bat
Code: Select all
rem SIZES OF USER FOLDERS
rem https://www.voidtools.com/downloads/#cli
CHCP 1251
SET "spaces= "
SET "delimiter=:"
SETLOCAL EnableDelayedExpansion
CLS
@echo off
REM uncomment to start Everything:
REM START Everything.exe -config Everything.ini -nodb -startup -monitor-pause
ECHO --------------------------------------
ECHO Folder sizes for %Username% in bytes:
ECHO --------------------------------------
SET "name=shell:Favorites" && for /F "delims=" %%a in ('es.exe shell:"Favorites\" -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:My Pictures" && for /F "delims=" %%a in ('es.exe shell:"My Pictures\" -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:My Music" && for /F "delims=" %%a in ('es.exe shell:"My Music\" -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:My Video" && for /F "delims=" %%a in ('es.exe shell:"My Video\" -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:Desktop" && for /F "delims=" %%a in ('es.exe shell:Desktop\ -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:Personal" && for /F "delims=" %%a in ('es.exe shell:Personal\ -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:Downloads" && for /F "delims=" %%a in ('es.exe shell:Downloads\ -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:SavedGames" && for /F "delims=" %%a in ('es.exe shell:SavedGames\ -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:Startup" && for /F "delims=" %%a in ('es.exe shell:Startup\ -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:Common startup" && for /F "delims=" %%a in ('es.exe shell:"Common startup\" -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:NetHood" && for /F "delims=" %%a in ('es.exe shell:NetHood -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:SendTo" && for /F "delims=" %%a in ('es.exe shell:SendTo\ -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
SET "name=shell:Programs" && for /F "delims=" %%a in ('es.exe shell:Programs\ -get-total-size -timeout 60000') do (set size=%%a) && CALL :formatout
ECHO --------------------------------------
REM uncomment to exit Everything:
REM Everything.exe -exit
PAUSE
GOTO :EOF
:formatout
CALL :padright name 20
CALL :padleft size 13
ECHO %name% %delimiter% %size%
GOTO :eof
:padright
CALL SET padded=%%%1%%%spaces%
CALL SET %1=%%padded:~0,%2%%
GOTO :eof
:padleft
CALL SET padded=%spaces%%%%1%%
CALL SET %1=%%padded:~-%2%%
GOTO :eof
Code: Select all
--------------------------------------
Folder sizes for User in bytes:
--------------------------------------
shell:Favorites : 2714
shell:My Pictures : 4964822
shell:My Music : 32329
shell:My Video : 504
shell:Desktop : 4608845239
shell:Personal : 1081536182
shell:Downloads : 0
shell:SavedGames : 967436427
shell:Startup : 3903
shell:Common startup : 174
shell:NetHood : 0
shell:SendTo : 7538
shell:Programs : 45688
--------------------------------------