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