Discussion Locked

Size of subfolders

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I can get the total size of a parent folder but want I need is to get a list of all its subfolders and their individual size. Is there a tool available for this? In my case I have a parent folder called users but I want to get the size of eachindividual users folder.

Regards,
Steely

9 replies

by ann777

Yes, you can download freeware software called TreeSize:

"TreeSize tells you where precious disk space has gone to. It can be started from the context menu of a folder or drive and shows you the size of this folder, including its subfolders. Each folder can be expanded in Explorer-like style to see the size of its subfolders. Scanning is done in a thread, so you can already see results while TreeSize is working. The results can be printed in a report."

http://download.com.com/3000-2248-10139401.html?tag=lst-0-7

by ann777

Please remove the embedded space at the end of the above link when pasting it into your browser.

by nettek

There is a command called DIRUSE.EXE in the NT Resource Kit. You can specify it to output to a log file, specify the display to be in bytes, kilobytes, or megabytes, and you can specify that only folders over a certain size are listed.

by jordana

Here's a batch file using diruse.exe from the reskit I wrote a while ago...
-----------------copy below here--------------
@ECHO OFF
REM NAME: Usage.cmd
REM
REM PURPOSE: This is a batch job to determine any user with over 300MB
REMof disk space usage in their home drive. The output should
REM be redirected to a log file in the scheduler if you run it.
REM
REM REQ: You need to have the resource kit installed on the machine
REM you will be running this from, or it won't work!
REM
REM BY: Jordan Arendt
REM
REM DATE: April 1, 1999
REM
REM UPDATED:

REM ******** Drive Mappings ***********************

REM Let's map some drives. o will be the home directories we want to run
REM the reports on, q will be the dir we are going to log to. (these shares need
REM to be created)

net use o: \\fileserver\home$
net use q: \\logserver\usage$

REM Let's write the date to the log file.

date /T > q:\usage.log

REM Wow, that wasn't too hard. Now let's run diruse and find those disk hogs!
REM Note that diruse comes with NT Resource Kit...
REM DIRUSE COMMAND Breakdown:
REM we are gonna use MB (/M)
REM we are gonna sperate thousands of MB (/,)
REM we are gonnause the top level dirs. Don't want to check subdirs.(/*)
REM we are gonna show only the people in excess of (/D)
REM we are gonna set the limit at 500MB (/Q:500)
@ECHO ON
diruse /M /, /* /D /L /Q:250 O:

REM OK, here it get's tricky. We are going to append to a file and then
REM copy it back to the original....

copy q:\usage.log+diruse.log q:\usage2.log
del q:\usage.log
rename q:\usage2.log usage.log

REM OK, let's do a bit of clean up...

del diruse.log

REM OK, let's finish off the cleanup by unmapping the drives
net use o: /delete
net use q: /delete

by jordana

OOPs, we changed the limit to 250MB, not the 500MB in the comment. Also, note that the /L switch logs to a file called DIRUSE.LOG in the working directory. Basically, you can save the above batch file, create the two shares, and use AT to scheduleiot to run in the wee hours of the morning. Note, it takes a while to run, depending on the number of users you have.

Jordan

This discussion is closed to new replies.