How can I check folder sizes inside my drive in Microsoft?

How can I check folder sizes inside my drive?
ptulafonoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

maytrixCommented:
Aside from clicking the properties of each folder to view the size, you'd need a 3rd party application.  There's a lot to choose from and most will give you graphical views of where the space is being taken up.

Here's one I've used and liked.  http://www.foldersizes.com/
0
MSLDENCommented:
hi ..
open windows explorer .
right clik the folder u want to check .
choose proparites .
read the folder size.
0
TheGorbyCommented:
I wrote this using AutoIT (http://www.autoitscript.com/site/autoit/), when run it outputs the sizes of subfolders (or files) of a specified folder, to a CSV file.
#include <GUIConstantsEx.au3>
#include <onEventFunc.au3>
#include <WindowsConstants.au3>
TraySetToolTip("SizeFinder - Idle")

Dim $hndsrc,$hnddst,$count,$tsize,$line,$size,$timecrt,$created,$timemod,$modified,$timeacc,$accessed
Dim $source=@TempDir & "\FileList.tmp"
Dim $type="",$yn=0,$count=0,$tsize=0,$gui=1

If MsgBox(1,"SizeFinder","Welcome to SizeFinder. This tool is used to get a list of file or folder sizes.")=2 Then Exit

$parentfld=FileSelectFolder("Choose the folder you want to scan INSIDE of:","",2,"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}")
If @error=1 Then Exit
$parentfld="""" & $parentfld & """"

Opt("GUIOnEventMode",1)
$prompt=GUICreate("SizeFinder",330,125)
GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
GUICtrlCreateLabel("Would you like to list the size of files only or folders only?",30,15)
GUICtrlCreateLabel("(both options will include subfolders)",75,40)
$installfiles=GUICtrlCreateButton("Files Only",20,75,80)
$installdirs=GUICtrlCreateButton("Folders Only",125,75,80)
$cancel=GUICtrlCreateButton("Cancel",230,75,80)
SetOnEventA($installfiles,"_Scan",$paramByVal,0)
SetOnEventA($installdirs,"_Scan",$paramByVal,1)
GUICtrlSetOnEvent($cancel,"_Exit")
GUISetState(@SW_SHOW)
While $gui=1
  Sleep(1000)  ; Idle around
WEnd

ProgressOn("SizeFinder","Getting " & $type & " sizes... 0% finished","",200,200,16)
$prghnd=WinGetHandle("SizeFinder","Getting")
$dest=FileSaveDialog("Name the CSV output file:","::{20D04FE0-3AEA-1069-A2D8-08002B30309D}","CSV File - Tab delimited (*.csv)",16,"SizeList-" & $type & "s-" & @YEAR & @MON & @MDAY & "-" & @HOUR & @MIN & ".csv",$prghnd)
If @error=1 Then
	FileDelete($source)
	Exit
EndIf

TraySetToolTip("SizeFinder - Getting " & $type & " sizes...")

$hndsrc=FileOpen($source,1)
FileWrite($hndsrc,"STOP")
FileFlush($hndsrc)
FileSetPos($hndsrc,0,0)
$linecnt=StringSplit(FileRead($hndsrc),@CRLF,1)
FileSetPos($hndsrc,0,0)
ProgressSet(0,"Reading..." & @LF & "0 of " & $linecnt[0],"Getting " & $type & " sizes... 0.00% finished")

$hnddst=FileOpen($dest,2)
Switch $type
	Case "file"
		FileWriteLine($hnddst,"Name,Size,Size (bytes),Created,Modified,Accessed")
	Case "folder"
		FileWriteLine($hnddst,"Name,Size,Size (bytes)")
EndSwitch

While 1
	$line=FileReadLine($hndsrc)
	If $line="STOP" Then ExitLoop
	;If StringInStr($line,"U:\IT\")=0 Then
		If $yn=7 Then
			$newprnt=StringReplace($parentfld,"""","")
			If StringLen($newprnt)<>StringInStr($newprnt,"\",0,-1) Then $newprnt=$newprnt & "\"
			$line=$newprnt & $line
		EndIf
		TraySetToolTip("SizeFinder - Getting " & $type & " sizes... " & Round(($count/$linecnt[0])*100,0) & "%")
		ProgressSet(($count/$linecnt[0])*100,$line & @LF & $count & " of " & $linecnt[0],"Getting " & $type & " sizes... " & Round(($count/$linecnt[0])*100,2) & "% finished")
		If FileExists($line) Then
			Switch $type
				Case "file"
					$size=FileGetSize($line)
					$tsize=$tsize+$size
					Switch $size
						Case 0 To 1024
							$sized=Round($size,2) & " bytes"
						Case 1025 To 1048575
							$sized=Round(($size/1024),2) & " KB"
						Case Else
							$sized=Round(($size/1048576),2) & " MB"
					EndSwitch
					$timecrt=FileGetTime($line,1)
					$created=$timecrt[0] & "-" & $timecrt[1] & "-" & $timecrt[2] & " " & $timecrt[3] & ":" & $timecrt[4] & ":" & $timecrt[5]
					$timemod=FileGetTime($line,0)
					$modified=$timemod[0] & "-" & $timemod[1] & "-" & $timemod[2] & " " & $timemod[3] & ":" & $timemod[4] & ":" & $timemod[5]
					$timeacc=FileGetTime($line,2)
					$accessed=$timeacc[0] & "-" & $timeacc[1] & "-" & $timeacc[2] & " " & $timeacc[3] & ":" & $timeacc[4] & ":" & $timeacc[5]
					FileWriteLine($hnddst,StringReplace($line,","," ",0,2) & "," & $sized & "," & $size & "," & $created & "," & $modified & "," & $accessed)
				Case "folder"
					$size=DirGetSize($line)
					$tsize=$tsize+$size
					Switch $size
						Case 0 To 1024
							$sized=Round($size,2) & " bytes"
						Case 1025 To 1048575
							$sized=Round(($size/1024),2) & " KB"
						Case Else
							$sized=Round(($size/1048576),2) & " MB"
					EndSwitch
					FileWriteLine($hnddst,StringReplace($line,","," ",0,2) & "," & $sized & "," & $size)
			EndSwitch
			$count=$count+1
		EndIf
	;EndIf
	TraySetToolTip("SizeFinder - Getting " & $type & " sizes... " & Round(($count/$linecnt[0])*100,0) & "%")
	ProgressSet(($count/$linecnt[0])*100,$line & @LF & $count & " of " & $linecnt[0],"Getting " & $type & " sizes... " & Round(($count/$linecnt[0])*100,2) & "% finished")
WEnd
TraySetToolTip("SizeFinder - Idle")
FileClose($hndsrc)
FileDelete($hndsrc)
ProgressOff()

FileWriteLine($hnddst,@CRLF & "Total number of " & $type & "s: " & $count)
If $yn=6 Then
	FileWriteLine($hnddst,"Total combined size: (N/A when listing folders and their subfolders)")
Else
	$tsize=$tsize/1048576
	$tsize=Round(($tsize/1000),3) & " GB"
	FileWriteLine($hnddst,"Total combined size: " & $tsize)
EndIf
FileClose($hnddst)

If ($count+4)>65536 Then
	MsgBox(0+48+0+0+262144,"SizeFinder","Script has finished outputting " & $type & " sizes to " & $dest & "." & @LF & @LF & "Since there were more than 65,536 " & $type & "s found, the CSV file can only be opened in Excel 2007 or later. Sorry.")
Else
	MsgBox(0+48+0+0+262144,"SizeFinder","Script has finished outputting " & $type & " sizes to " & $dest & ".")
EndIf

Func _Scan($ford)
	GUIDelete($prompt)
	$gui=0
	TraySetToolTip("SizeFinder - Building list...")
	If $ford=1 Then $yn=MsgBox(4+32+256+0+0,"SizeFinder","Do you want to list all subfolders individually?")
	$wait=GUICreate("Building List...",550,412,-1,-1,BitOR($WS_BORDER,$WS_POPUP),$WS_EX_TOPMOST)
	GUICtrlCreateLabel("Please wait while SizeFinder builds the list of items...",155,155)
	GUICtrlCreateLabel("Items are added at an approximate rate of 68,500 per minute.",127,185)
	GUISetState(@SW_SHOW)
	FileChangeDir(@SystemDir)
	Switch $ford
		Case 0
			RunWait(@ComSpec & " /c DIR " & $parentfld & " /A:-D /B /O:N /S>""" & $source & """","",@SW_HIDE)
			$type="file"
		Case 1
			If $yn=6 Then RunWait(@ComSpec & " /c DIR " & $parentfld & " /A:D /B /O:N /S>""" & $source & """","",@SW_HIDE)
			If $yn=7 Then RunWait(@ComSpec & " /c DIR " & $parentfld & " /A:D /B /O:N>""" & $source & """","",@SW_HIDE)
			$type="folder"
	EndSwitch
	GUIDelete($wait)
	FileChangeDir(@ScriptDir)
EndFunc

Func _Exit()
	Exit
EndFunc

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Leon FesterSenior Solutions ArchitectCommented:
Follow these instructions to add the FolderSize column to see the size of the folder.
http://windowsxp.mvps.org/foldersize.htm

Alternatively download and install Treesize professional.
It's a really nice tool to do age analysis for multiple layer folders.
It also has a addin for adding a Treesize Column to explorer which works much the same as the FolderSize option mentioned above.

Treesize professional is perfect for drilling down into the age and type of files being stored per folder.
Also has excellent reporting and exporting capabilities.
http://www.jam-software.com/treesize/
0
Guillermo FeijóoSystems administratorCommented:
Hi:

    I use diskdata, wich I think is a great solution.

http://www.diskdata.com/DISKdata.html
0
FireW0lfCommented:
Microsoft have a small commandline app I use often called DIRUSE.EXE

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=955D7F2F-73D9-4018-9DD7-42DA210E62EE&displaylang=en

Yes it's ancient, but I still use it alot with scripting against our servers

It works even on home folders of other users (which are by default denied even to admins unless they take ownership)

Output from doing a "DIRUSE /?"
C:\AdminTools>DIRUSE.EXE /?

DIRUSE displays a list of disk usage for a directory tree(s). Version 1.20

DIRUSE [/S | /V] [/M | /K | /B] [/C] [/,] [/Q:# [/L] [/A] [/D] [/O]] [/*] DIRS

/S      Specifies whether subdirectories are included in the output.
/V      Output progress reports while scanning subdirectories.  Ignored if /S is
 specified.
/M      Displays disk usage in megabytes.
/K      Displays disk usage in kilobytes.
/B      Displays disk usage in bytes (default).
/C      Use Compressed size instead of apparent size.
/,      Use thousand separator when displaying sizes.
/L      Output overflows to logfile .\DIRUSE.LOG.
/*      Uses the top-level directories residing in the specified DIRS
/Q:#    Mark directories that exceed the specified size (#) with a "!".
        (If /M or /K is not specified, then bytes is assumed.)
/A      Specifies that an alert is generated if specified sizes are exceeded.
        (The Alerter service must be running.)
/D      Displays only directories that exceed specified sizes.
/O      Specifies that subdirectories are not checked for specified size
        overflow.
DIRS    Specifies a list of the paths to check.

Note:   Parameters can be typed in any order. And the '-' symbol can be
        used in place of the '/' symbol.

        Also, if /Q is specified, then return code is ONE if any directories are
 found that
        exceed the specified sizes.  Otherwise the return code is ZERO.

Example: diruse /s /m /q:1.5 /l /* c:\users

C:\AdminTools>

Open in new window

As you can see, it has the "/L" option to output to a logfile, or of course you can use " > Logfile.txt" as usual to redirect output to file
0
FireW0lfCommented:
I tend to DIRUSE.exe /M /* C:\TheFolderContainingTheFoldersIWantTheSizesOf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.