Query to get all items in a list including items in the sub folders in SharePoint

那年仲夏 提交于 2019-12-20 03:55:23

问题


I have a document library list. I created folders in that list and uploaded some files to those sub folders. How to get all these files which are in sub-folders in that document library list using SPQuery?


回答1:


If you want to query all folders and sub folders of a list or document library, you have to define extra query options. If you are working with the object model you have to set the ViewAttributes property of the SPQuery object as follows:

qry.ViewAttributes = "Scope='Recursive'";



来源:https://stackoverflow.com/questions/4192873/query-to-get-all-items-in-a-list-including-items-in-the-sub-folders-in-sharepoin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!