Modified it a bit, now you can calculate the size by dragging in the folder:
@echo off
mode con cols=100 lines=20
setlocal enabledelayedexpansion
set /p pt=Drag in the folder?:
set "pt=%pt:"=%"
echo :
for /f "tokens=*" %%c in ('dir "%pt%" /ad /b /s') do (
for /f "tokens=3,4 delims= " %%i in ('dir "%%c"^|findstr "个文件"') do (
echo -------------------
echo."%%c" : %%i %%j
set "zer=%%i"
set "zer=!zer:,=!"
set /a num=!num!+!zer!
)
)
for /f "tokens=3,4 delims= " %%i in ('dir "%pt%"^|findstr "个文件"') do (
echo -------------------
echo."%pt%" : %%i %%j
set "zer=%%i"
set "zer=!zer:,=!"
set /a num=!num!+!zer!
)
echo.
echo :
echo %num% bytes
pause>nul
goto :eof
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
| kennyfan |
+2 |
2010-04-13 08:26 |