Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

4.3 Browsing a Document Folder

The following example demonstrates how a client can use the Search command request ([MS-ASCMD] section 2.2.2.14) to browse a folder on a remote share. The client submits a request for a folder to view, and the server responds with a list of the folder's contents.

Request:

<?xml version="1.0" encoding="utf-8"?>
<Search xmlns="Search:" xmlns:documentlibrary="DocumentLibrary:">
  <Store>
    <Name>DocumentLibrary</Name>
    <Query>
      <EqualTo>
        <documentlibrary:LinkId/>
        <Value>\\myserver\myshare</Value>
      </EqualTo>
    </Query>
    <Options>
      <Range>0-999</Range>
    </Options>
  </Store>
</Search>

Response:

<?xml version="1.0" encoding="utf-8"?>
<Search xmlns="Search:" xmlns:documentlibrary="DocumentLibrary:">
  <Status>1</Status>
  <Response>
    <Store>
      <Status>1</Status>
      <Result>
        <Properties>
          <documentlibrary:LinkId>\\myserver\myshare</documentlibrary:LinkId>
          <documentlibrary:DisplayName>d$</documentlibrary:DisplayName>
          <documentlibrary:IsFolder>1</documentlibrary:IsFolder>
          <documentlibrary:CreationDate>2007-10-02T00:34:28.686Z</documentlibrary:CreationDate>
          <documentlibrary:LastModifiedDate>2009-11-13T21:48:20.919Z</documentlibrary:LastModifiedDate>
          <documentlibrary:IsHidden>1</documentlibrary:IsHidden>
        </Properties>
      </Result>
      <Result>
        <Properties>
          <documentlibrary:LinkId\\myserver\myshare\blah.txt</documentlibrary:LinkId>
          <documentlibrary:DisplayName>blah.txt</documentlibrary:DisplayName>
          <documentlibrary:IsFolder>0</documentlibrary:IsFolder>
          <documentlibrary:CreationDate>2007-10-02T18:26:52.265Z</documentlibrary:CreationDate>
          <documentlibrary:LastModifiedDate>2009-04-02T02:57:55.843Z</documentlibrary:LastModifiedDate>
          <documentlibrary:IsHidden>1</documentlibrary:IsHidden>
        </Properties>
      </Result>
      <Result>
        <Properties>
          <documentlibrary:LinkId>\\myserver\myshare\foo</documentlibrary:LinkId>
          <documentlibrary:DisplayName>foo</documentlibrary:DisplayName>
          <documentlibrary:IsFolder>1</documentlibrary:IsFolder>
          <documentlibrary:CreationDate>2009-10-13T00:43:44.660Z</documentlibrary:CreationDate>
          <documentlibrary:LastModifiedDate>2009-10-13T00:46:17.421Z</documentlibrary:LastModifiedDate>
          <documentlibrary:IsHidden>0</documentlibrary:IsHidden>
        </Properties>
      </Result>
      <Range>0-2</Range>
      <Total>3</Total>
    </Store>
  </Response>
</Search>
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.