Query to get all items in a list including items i

2019-03-02 16:01发布

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条回答
萌系小妹纸
2楼-- · 2019-03-02 16:10

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'";

查看更多
登录 后发表回答