Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: 21 Feb 2006 07:49:20 -0800,    group: microsoft.public.exchange2000.development        back       


count folder items   
I have code to calculate the exchange mailbox folders size, I'd like to
add the item count for the folders as well.

The key line for folder size is:
oXMLSizeNodes = oXMLDoc.getElementsByTagName("d:x0e080003")

what is the tag name for folder item count?


Thanks,
HankC
date: 21 Feb 2006 07:49:20 -0800   author:   HankC

Re: count folder items   
You can use property "DAV:childcount"

Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com


"HankC"  wrote in message news:1140536960.442826.113220@g43g2000cwa.googlegroups.com...
> 
> I have code to calculate the exchange mailbox folders size, I'd like to
> add the item count for the folders as well.
> 
> The key line for folder size is:
> oXMLSizeNodes = oXMLDoc.getElementsByTagName("d:x0e080003")
> 
> what is the tag name for folder item count?
> 
> 
> Thanks,
> HankC
>
date: Tue, 21 Feb 2006 16:57:33 +0100   author:   Michael

Re: count folder items   
Hello Hank,

note that with your property, you will have problems getting the size of a 
folder with a content greater than 2 GB. See 
http://www.infinitec.de/exchange/howtos/getpublicfoldersize.aspx.

Greetings,
Henning Krause

"HankC"  wrote in message 
news:1140536960.442826.113220@g43g2000cwa.googlegroups.com...
>
> I have code to calculate the exchange mailbox folders size, I'd like to
> add the item count for the folders as well.
>
> The key line for folder size is:
> oXMLSizeNodes = oXMLDoc.getElementsByTagName("d:x0e080003")
>
> what is the tag name for folder item count?
>
>
> Thanks,
> HankC
>
date: Tue, 21 Feb 2006 18:39:20 +0100   author:   Henning Krause [MVP]

Re: count folder items   
Thanks,

running

oXMLChildCount = oXMLDoc.getElementsByTagName("a:childcount")

returns 0 items...


HankC


Michael wrote:
> You can use property "DAV:childcount"
>
> Michael
> -------------------------------
> If you need WebDAV API for Exchange server,
> use our component WebDAV .NET for Exchange.
> Check out http://www.independentsoft.com
>
>
> "HankC"  wrote in message news:1140536960.442826.113220@g43g2000cwa.googlegroups.com...
> >
> > I have code to calculate the exchange mailbox folders size, I'd like to
> > add the item count for the folders as well.
> >
> > The key line for folder size is:
> > oXMLSizeNodes = oXMLDoc.getElementsByTagName("d:x0e080003")
> >
> > what is the tag name for folder item count?
> > 
> > 
> > Thanks,
> > HankC
> >
date: 23 Feb 2006 09:17:03 -0800   author:   HankC

Re: count folder items   
Hello,

the getElementsByTagName is not the correct way to determine the number of 
items.

Could you post your full code?

Greetings,
Henning Krause


"HankC"  wrote in message 
news:1140715023.040961.223390@p10g2000cwp.googlegroups.com...
>
> Thanks,
>
> running
>
> oXMLChildCount = oXMLDoc.getElementsByTagName("a:childcount")
>
> returns 0 items...
>
>
> HankC
>
>
> Michael wrote:
>> You can use property "DAV:childcount"
>>
>> Michael
>> -------------------------------
>> If you need WebDAV API for Exchange server,
>> use our component WebDAV .NET for Exchange.
>> Check out http://www.independentsoft.com
>>
>>
>> "HankC"  wrote in message 
>> news:1140536960.442826.113220@g43g2000cwa.googlegroups.com...
>> >
>> > I have code to calculate the exchange mailbox folders size, I'd like to
>> > add the item count for the folders as well.
>> >
>> > The key line for folder size is:
>> > oXMLSizeNodes = oXMLDoc.getElementsByTagName("d:x0e080003")
>> >
>> > what is the tag name for folder item count?
>> >
>> >
>> > Thanks,
>> > HankC
>> >
>
date: Thu, 23 Feb 2006 19:11:23 +0100   author:   Henning Krause [MVP]

Re: count folder items   
Henning Krause [MVP] wrote:
> Hello,
>
> the getElementsByTagName is not the correct way to determine the number of
> items.
>
> Could you post your full code?
>

Here the main snippet. Thanks for your time!

        oXMLSizeNodes = oXMLDoc.getElementsByTagName("d:x0e080003")

        oXMLHREFNodes = oXMLDoc.getElementsByTagName("a:href")

        oXMLHasSubsNodes = oXMLDoc.getElementsByTagName("a:hassubs")

        oXMLChildCount = oXMLDoc.getElementsByTagName("DAV:childcount")

        Err.Clear()

        Dim i As Int16
        Dim name_index As Int16
        Dim folder_size As String
        Dim folder_items As String
        Dim folder_name As String
        'Dim isum As Int64

        Err.Clear()
        debug_echo(results, "oXMLSizeNodes.length: " &
oXMLSizeNodes.length)
        debug_echo(results, "oXMLChildCount.length: " &
oXMLChildCount.length)

        For i = 0 To oXMLSizeNodes.length - 1

            name_index = InStr(oXMLHREFNodes.Item(i).nodeTypedValue,
sUrl)
            folder_name = Mid(oXMLHREFNodes.Item(i).nodeTypedValue,
name_index + Len(sUrl), Len(oXMLHREFNodes.Item(i).nodeTypedValue) -
Len(sUrl) + 1)


            folder_size = Format((500 +
oXMLSizeNodes.Item(i).nodeTypedValue) / 1000, "#,###")
            folder_items =
Format(oXMLChildCount.Item(i).nodeTypedValue, "#,###")
date: 24 Feb 2006 07:25:32 -0800   author:   HankC

Re: count folder items   
Hi Hank,

take a look at 
http://www.infinitec.de/en/exchange/howtos/getpublicfoldersize.aspx.

This script gets the size of a given private/public folder.

To get the number of Items (DAV:Childcount), you need to modify these to 
lines in the example script:

    xmldoc.setProperty "SelectionNamespaces", "xmlns:DAV='DAV:'"
    wscript.echo "Size of folder: " & 
xmldoc.selectSingleNode("//DAV:childcount").text

Greetings,
Henning Krause

"HankC"  wrote in message 
news:1140794732.275296.232710@v46g2000cwv.googlegroups.com...
>
> Henning Krause [MVP] wrote:
>> Hello,
>>
>> the getElementsByTagName is not the correct way to determine the number 
>> of
>> items.
>>
>> Could you post your full code?
>>
>
> Here the main snippet. Thanks for your time!
>
>        oXMLSizeNodes = oXMLDoc.getElementsByTagName("d:x0e080003")
>
>        oXMLHREFNodes = oXMLDoc.getElementsByTagName("a:href")
>
>        oXMLHasSubsNodes = oXMLDoc.getElementsByTagName("a:hassubs")
>
>        oXMLChildCount = oXMLDoc.getElementsByTagName("DAV:childcount")
>
>        Err.Clear()
>
>        Dim i As Int16
>        Dim name_index As Int16
>        Dim folder_size As String
>        Dim folder_items As String
>        Dim folder_name As String
>        'Dim isum As Int64
>
>        Err.Clear()
>        debug_echo(results, "oXMLSizeNodes.length: " &
> oXMLSizeNodes.length)
>        debug_echo(results, "oXMLChildCount.length: " &
> oXMLChildCount.length)
>
>        For i = 0 To oXMLSizeNodes.length - 1
>
>            name_index = InStr(oXMLHREFNodes.Item(i).nodeTypedValue,
> sUrl)
>            folder_name = Mid(oXMLHREFNodes.Item(i).nodeTypedValue,
> name_index + Len(sUrl), Len(oXMLHREFNodes.Item(i).nodeTypedValue) -
> Len(sUrl) + 1)
>
>
>            folder_size = Format((500 +
> oXMLSizeNodes.Item(i).nodeTypedValue) / 1000, "#,###")
>            folder_items =
> Format(oXMLChildCount.Item(i).nodeTypedValue, "#,###")
>
date: Fri, 24 Feb 2006 21:41:54 +0100   author:   Henning Krause [MVP]

Re: count folder items   
Henning Krause [MVP] wrote:
> Hi Hank,
>
> take a look at
> http://www.infinitec.de/en/exchange/howtos/getpublicfoldersize.aspx.
>
> This script gets the size of a given private/public folder.
>
> To get the number of Items (DAV:Childcount), you need to modify these to
> lines in the example script:
>
>     xmldoc.setProperty "SelectionNamespaces", "xmlns:DAV='DAV:'"
>     wscript.echo "Size of folder: " &
> xmldoc.selectSingleNode("//DAV:childcount").text
> 

Thanks, but it does not work..


HankC
date: 28 Feb 2006 08:37:28 -0800   author:   HankC

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us