Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Active Directory » Check Folder Size
Check Folder Size [message #157308] Mon, 06 July 2009 07:13 Go to next message
sharath_bujji  is currently offline sharath_bujji
Messages: 7
Registered: June 2009
Junior Member
Hi,

The drives are running out of space on a Server, I would like to know which
is the folder taking too much of space. Is there any scripts which help in
finding the folder size...rather than clicking on each folder to know the
size.

Please help me...

Thanks,
Sharath
Re: Check Folder Size [message #157309 is a reply to message #157308] Mon, 06 July 2009 07:42 Go to previous messageGo to next message
meiweb(nospam)  is currently offline meiweb(nospam)  Germany
Messages: 1307
Registered: July 2009
Senior Member
Hello sharath_bujji,

With:
http://www.google.de/search?hl=de&q=view+folder+size& ;meta=&aq=0&oq=view+folder

you will find some 3rd party tools, some are also freeware.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm


> Hi,
>
> The drives are running out of space on a Server, I would like to know
> which is the folder taking too much of space. Is there any scripts
> which help in finding the folder size...rather than clicking on each
> folder to know the size.
>
> Please help me...
>
> Thanks,
> Sharath
Re: Check Folder Size [message #157345 is a reply to message #157308] Tue, 07 July 2009 00:33 Go to previous messageGo to next message
markdmac  is currently offline markdmac  United States
Messages: 139
Registered: July 2009
Senior Member
'=======================================================================
===
'
' NAME: FolderSizes.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: http://www.thespidersparlor.com
' DATE  : 12/23/2003
'
' COMMENT: 
'
'    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
'    ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED To
'    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
'    PARTICULAR PURPOSE.
'
'    IN NO EVENT SHALL THE SPIDER'S PARLOR AND/OR ITS RESPECTIVE
SUPPLIERS
'    BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
'    DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
'    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
'    ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
'    OF THIS CODE OR INFORMATION.
'
'=======================================================================
===

'Check all subfolders below given folder for size over a minimum size.
Dim FolderPath
Dim FolderSize
Dim MinSize

Set objArgs=WScript.Arguments
FolderPath=objArgs(0)
MinSize=CLng(objArgs(1)) 

Const CONVERSION_FACTOR = 1048576 'converts folder size to MB
'Const MinSize = 100 'set minimum folder size in MB.
If Wscript.Arguments.count = 0 Then
    Wscript.Echo "Usage: foldersize.vbs [folder][minimum size]"
    Wscript.Echo "Example: foldersize.vbs c:\myfolder 50"
    Wscript.Quit
End If

'FolderPath = Wscript.Arguments(0)
'MinSize = Wscript.Arguments(1)
report = "Folder Size" & vbTab &"Folder Name" & vbCrLf
Set FSO = CreateObject ("Scripting.FileSystemObject")
ShowSubFolders FSO.GetFolder(FolderPath)
MsgBox Report
Sub ShowSubFolders (Folder)
    For Each SubFolder In Folder.SubFolders 
    FolderSize = SubFolder.Size / CONVERSION_FACTOR
        If FolderSize >  MinSize Then
            report = report & int(FolderSize) & vbTab & vbTab &
SubFolder.Path & vbCrLf
        End If
        ShowSubFolders SubFolder
    Next

End Sub


Hope that helps,

Mark D. MacLachlan
Re: Check Folder Size [message #157347 is a reply to message #157308] Tue, 07 July 2009 01:45 Go to previous message
dileep.ponna.3uxxbb  is currently offline dileep.ponna.3uxxbb  United States
Messages: 1
Registered: July 2009
Junior Member
Hi, if it you have few folders you can use the batchfile

this applies for a single folder. Make a batchfile with all your folder
list and make the folderlist in the file to run this script.

Folder size batch file-
@echo off
setLocal EnableDelayedExpansion
set /a value=0
set /a sum=0
FOR /R %1 %%I IN (*) DO (
set /a value=%%~zI/1024
set /a sum=!sum!+!value!
)
@echo Size is: !sum! k


--
dileep.ponna
------------------------------------------------------------ ------------
dileep.ponna's Profile: http://forums.techarena.in/members/88349.htm
View this thread: http://forums.techarena.in/active-directory/1208824.htm

http://forums.techarena.in
Previous Topic:Event ID 1058 & 1030 Error
Next Topic:ISA Server 2006 and Firewall clients
Goto Forum:
  


Current Time: Fri Oct 20 02:55:39 EDT 2017

Total time taken to generate the page: 0.02697 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software