Forum Discussion
Ted_
2 years agoNew Member
Combine files - from SharePoint.Contents to SharePoint.Files in the same query
My company has a SharePoint folder with many files inside. I used the "SharePoint.Contents" method to access a specific folder ("Level 4" see picture) to speed up the refresh. The files that I need...
lbendlin
2 years agoSuper User
Use the .Files method, but immediately apply a heavy path (and file name) filter so you don't have to wait for the entire contents list to come over, and still get all the required file binary links in the same list.
Ted_
2 years agoNew Member
Hello lbendlin,
thanks for your reply. Can you explain me what you mean for heavy path?
I have already try to filter on path but require a lot of minutes to preocess the refresh.
thanks in advance
- lbendlin2 years agoSuper User
As you have experienced, SharePoint.Files enumerates ALL the files on the SharePoint site. That can be many tens of thousands of files. Specifying a folder filter early will help to cut that list down to a more manageable size