All pastes #1067411 Raw Edit

getsize.bat

public text v1 · immutable
#1067411 ·published 2008-07-10 01:38 UTC
rendered paste body
@echo off
rem Gets the directory size
rem Copied and modified from http://www.pcreview.co.uk/forums/thread-1466099.php
rem Usage: getsize dir_name

setlocal
for /f "tokens=*" %%a in ( 'dir /w /s %1 ^| findstr "File(s)"') do @set info=%%a

rem Output the results (modify if needed)
echo Directory %1 - %info%