+ Post New Thread
Results 1 to 5 of 5
Windows Thread, OWA Folder Size in Technical; I know this feature is not available in OWA but is there a way to do it? Maybe create a ...
  1. #1
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42

    OWA Folder Size

    I know this feature is not available in OWA but is there a way to do it? Maybe create a web application that links into OWA?

  2. #2
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42

    Re: OWA Folder Size

    Ok I've found a way to display folder sizes using an asp page but i was wondering if anyone know how to integrate this into OWA. If its possible i would like to add an additional option when you right click any of the folders in tree view ie if you right click in box the submenu will have an option that says 'Folder Size'. If thats not possible maybe someone could suggest a way to link OWA and my asp page together?

  3. #3

    Join Date
    Nov 2008
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    owa folder size

    I would love to see your asp page you used to create this. unless you found a better solution.

  4. #4
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42
    The following is the script used to get and display the mailbox size but I dont know if it will work with 2007, and I thought there was already a way (inbuilt feature) to display the mailbox size in OWA 2007.
    Code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <html>
    <head>
    <title>MailBox Size</title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    <%
    Dim strError
    Dim iSize
    Dim sMsg
    Dim strLogon, arrLogon, strPassword
    Dim arrFolders(11), arrFolderPath
    
    strLogon = Request.ServerVariables("LOGON_USER")
    
    if instr(strLogon,"\") <> 0 then
    	arrLogon = split(strLogon,"\")
    	strLogon = arrLogon(1)
    elseif instr(strLogon,"@") <> 0 then
    	arrLogon = split(strLogon,"@")
    	strLogon = arrLogon(0)
    end if
    
    strPassword = Request.ServerVariables("AUTH_PASSWORD")
    
    strError = MailboxSize
    
    Function MailboxSize()
       	Dim sConnString
    
       	' Set up connection string to mailbox.
       	sConnString = "file://./backofficestorage/exchange.suttcold.bham.sch.uk/mbx/"	
    	sConnString = sConnString & strLogon
    
       	iSize = 0
    	
    	for i = 0 to 11
    		arrFolders(i) = 0
    	next
    
       	RecurseFolder(sConnString)
    
    	MailboxSize = sMsg
    End Function
    
    Public Function RecurseFolder(sConnString)
    on error resume next
       	Dim oRecSet
       	Dim sSQL
    	Dim sConn
    	Dim oConn
    	Dim iFolderSize
    	
       ' Set up SQL SELECT statement.
       	sSQL = "SELECT ""http://schemas.microsoft.com/mapi/proptag/x0e080003"", "
       	sSQL = sSQL & """DAV:href"", "
       	sSQL = sSQL & """DAV:hassubs"" "
       	sSQL = sSQL & "FROM SCOPE ('SHALLOW TRAVERSAL OF """ & sConnString
       	sSQL = sSQL & """') WHERE ""DAV:isfolder"" = true"
    
    	sConn = "Provider=Exoledb.DataSource.1;User ID=" & strLogon & ";Password=" & strPassword
    	sConn = sConn & ";Mode=Read;Data Source=" & sConnString
    
       	' Create RecordSet object.
       	Set oRecSet = CreateObject("ADODB.Recordset")
       	if Err.Number <> 0 then
          	sMsg = "Error creating ADO RecordSet object: " & Err.Number & " " & Err.Description
          	Exit Function
       	end if
    
       ' Open Recordset of all subfolders in folder.
       	oRecSet.CursorLocation = 3
    	oRecSet.open sSQL, sConn
    
    	if Err.Number <> 0 then
          	sMsg = "Error opening recordset: " & Err.Number & " " & Err.Description
          	oRecSet.Close
          	Set oRecSet = Nothing
          	Exit Function
       	end if
    
       	if oRecSet.RecordCount = 0 then
          	oRecSet.Close
          	Set oRecSet = Nothing
          	Exit Function
       	end if
    
       	' Move to first record.
       	oRecSet.MoveFirst
       	if Err.Number <> 0 then
          	sMsg = "Error moving to first record: " & Err.Number & " " & Err.Description
          	oRecSet.Close
          	Set oRecSet = Nothing
          	Exit Function
       	end if
    
       	' Loop through all of the records, and then add the size of the 
       	' subfolders to obtain the total size.
       	While oRecSet.EOF <> True
    		iFolderSize = oRecSet.Fields.Item("http://schemas.microsoft.com/mapi/proptag/x0e080003")
    		redim arrFolderPath(-1)
    		arrFolderPath = split(oRecSet.Fields.Item("DAV:href"),"/")
          	' Increment size.
          	iSize = iSize + iFolderSize    
    		
    		if ubound(arrFolderPath) > 6 then
    			Select Case arrFolderPath(7)	
          			Case "Inbox"
    					arrFolders(0) = arrFolders(0) + iFolderSize
    				Case "Outbox"
    					arrFolders(1) = arrFolders(1) + iFolderSize
    				Case "Sent Items"
    					arrFolders(2) = arrFolders(2) + iFolderSize
    				Case "Deleted Items"
    					arrFolders(3) = arrFolders(3) + iFolderSize
    				Case "Calendar"
    					arrFolders(4) = arrFolders(4) + iFolderSize
    				Case "Contacts"
    					arrFolders(5) = arrFolders(5) + iFolderSize
    				Case "Drafts"
    					arrFolders(6) = arrFolders(6) + iFolderSize
    				Case "Journal"
    					arrFolders(7) = arrFolders(7) + iFolderSize
    				Case "Notes"
    					arrFolders(8) = arrFolders(8) + iFolderSize
    				Case "Tasks"
    					arrFolders(9) = arrFolders(9) + iFolderSize
    				Case "Junk E-mail"
    					arrFolders(10) = arrFolders(10) + iFolderSize
    				Case "Sync Issues"
    					arrFolders(11) = arrFolders(11) + iFolderSize
    			End Select	
    		end if
    		' If the folder has subfolders, recursively call RecurseFolder to process them.
          	If oRecSet.Fields.Item("DAV:hassubs") = True then
    	   		RecurseFolder oRecSet.Fields.Item("DAV:href")
          	End If
    		
          	' Move to next record.
          	oRecSet.MoveNext
          	if Err.Number <> 0 then
             	sMsg = "Error moving to next record: " & Err.Number & " " & Err.Description
             	Set oRecSet = Nothing
             	Exit Function
          	end if
       	wend
    
       ' Close Recordset and Connection.
       oRecSet.Close
       if Err.Number <> 0 then
          sMsg = "Error closing recordset: " & Err.Number & " " & Err.Description
          Set oRecSet = Nothing
          Exit Function
       end if
    
       ' Clean up memory.
       Set oRecSet = Nothing
    End Function
    %>
    <table width="407" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr> 
        <td width="161" height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Inbox:</font></td>
        <td width="246" valign="top"><%= cInt(arrFolders(0)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Outbox:</font></td>
        <td valign="top"><%= cInt(arrFolders(1)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Sent 
          Items:</font></td>
        <td valign="top"><%= cInt(arrFolders(2)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Deleted 
          Items:</font></td>
        <td valign="top"><%= cInt(arrFolders(3)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Calendar:</font></td>
        <td valign="top"><%= cInt(arrFolders(4)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Contacts:</font></td>
        <td valign="top"><%= cInt(arrFolders(5)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Drafts:</font></td>
        <td valign="top"><%= cInt(arrFolders(6)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Journal:</font></td>
        <td valign="top"><%= cInt(arrFolders(7)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Notes:</font></td>
        <td valign="top"><%= cInt(arrFolders(8)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Tasks:</font></td>
        <td valign="top"><%= cInt(arrFolders(9)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Junk 
          Mail:</font></td>
        <td valign="top"><%= cInt(arrFolders(10)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">Sync 
          Issues:</font></td>
        <td valign="top"><%= cInt(arrFolders(11)/1024) %></td>
      </tr>
      <tr> 
        <td height="20" valign="top"><font size="2" face="Arial, Helvetica, sans-serif">MailBox Total 
          Size:</font></td>
        <td valign="top"><%= cInt(iSize/1024) %></td>
      </tr>
      <tr> 
        <td height="70" colspan="2" valign="top"><%= strError %></td>
      </tr>
    </table>
    </body>
    </html>

  5. #5

    Join Date
    Nov 2008
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    owa folder size

    Owa 2007 does have a basic folder size but i just shows total mailbox size not individual folder size.

    can you tell me what lines would need to be updated to work with our setup.

    the page you are looking for is startpage.aspx it is located in the exchange server\clientAccess\Owa\forms\premium folder if you want to add a line right above the users name (where the hover shows mailbox quota) the row is approx line 130.
    I just added a new row and column and a hyperlink to where you want the user directed.



SHARE:
+ Post New Thread

Similar Threads

  1. WSUS Size
    By plexer in forum Windows
    Replies: 7
    Last Post: 12th December 2006, 10:08 AM
  2. Replies: 15
    Last Post: 12th October 2006, 10:37 PM
  3. RIS partition size questions..........?
    By Kyle in forum Windows
    Replies: 14
    Last Post: 29th March 2006, 08:34 PM
  4. Cookies Size on Disk
    By Mikey in forum How do you do....it?
    Replies: 8
    Last Post: 20th February 2006, 08:57 PM
  5. Easy Folder and File size viewer for students
    By altecsole in forum Windows
    Replies: 10
    Last Post: 29th November 2005, 11:03 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •