In SharePoint and using SPServices, I am trying to view folder contents of a specific subfolder of a document library (and not every single file & folder inside the library). The library structure looks like this:
List Name: Shared Documents
- Folder #1
- Subfolder #4
- File #6
- File #7
- Subfolder #5
- File #8
- File #9
- Subfolder #4
- Folder #2
- Folder #3
Listing out the top-level folders is easy enough with GetListItems but I want to the let the user click on one of the folders and list and list only the direct children of the subfolder.
So, if someone clicks on "Folder #1" then I want to show them only the following:
- Folder #4
- Folder #5
- File #9
I have absolutely no idea how to list out the direct children of a specific subfolder.
Can anyone help?
Best Answer
In order to restrict query for a specific folder,
CAMLQueryOptions
parameter withFolder
value could be specified:Example
Please follow this thread for a more details.