Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: ,

Sponsored Links



Check Folder Size

Active Directory


Reply
 
Thread Tools Search this Thread
  #1  
Old 06-07-2009
sharath_bujji
 
Posts: n/a
Check Folder Size

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
Reply With Quote
  #2  
Old 06-07-2009
Meinolf Weber [MVP-DS]
 
Posts: n/a
Re: Check Folder Size

Hello sharath_bujji,

With:

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!!!


> 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
Reply With Quote
  #3  
Old 07-07-2009
Mark D. MacLachlan
 
Posts: n/a
Re: Check Folder Size

Code:
'=======================================================================
===
'
' 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
Reply With Quote
  #4  
Old 07-07-2009
Member
 
Join Date: Apr 2009
Posts: 1
Re: Check Folder Size

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
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Check Folder Size"
Thread Thread Starter Forum Replies Last Post
Windows folder becomes very big in size Flamingo-R Operating Systems 5 14-12-2010 06:54 AM
How to see folder size in Windows Explorer Salome Operating Systems 5 14-03-2010 06:29 AM
How to check linux folder size ? NICKAN Software Development 2 19-06-2009 03:12 PM
How to determine folder size michaelh613 Vista Help 5 13-04-2009 07:13 PM
Windows folder size slvrvlt Windows Vista Performance 1 14-12-2008 03:14 PM


All times are GMT +5.5. The time now is 09:58 PM.