Articles

Solved Batch file of folder size

January 16, 2013 at 12:31:06
Specs: windows server 2003

Can anybody kindly provide me a batch file script to view the list of folder with their size in a specific drive. Just as "DIRUSE" does!

See More: Batch file of folder size

Report •


#1
January 16, 2013 at 14:47:26
✔ Best Answer

::contents of checkdir.bat
DIRUSE /M c:\foldername > dirinfo.log
::end of file

:: mike


Report •

#2
January 16, 2013 at 15:29:22

Untested:

forfiles /p c:\ /c "cmd /c if @isdir==TRUE echo @fsize"

Tony


Report •

#3
January 16, 2013 at 15:51:05

tonysathre: Untested:
Happy to help? Or is that "help?" I can never remember.

c:\>forfiles /p c:\ /c "cmd /c if @isdir==TRUE echo @fsize"

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

How To Ask Questions The Smart Way


Report •

Related Solutions

#4
January 17, 2013 at 02:45:01

:: ===== script starts here ===============
:: chk size of folder
:: supro.bat 2013-01-17 16:21:19.18
@echo off & setLocal enableDELAYedeXpansioN

set N=
pushd d:\files
for /f "tokens=* delims= " %%a in ('dir/b/a-d') do (
set /a N+=%%~Za
)
echo !N!
::====== script ends here =================

=====================
M2 Golden-Triangle


Report •


Ask Question