Question Get files/folders from sharepoint exclude hidden

ChrisF64

New member
Joined
Jan 4, 2020
Messages
1
Programming Experience
10+
Hi,

Below is my code to extract folders from sharepoint, but I also get de hidden folders like Form etc.
how can I fix this problem?


VB.NET:
Dim mappen As Folder = web.GetFolderByServerRelativeUrl(pad)

context.Load(mappen, Function(f2) f2.Folders)

context.ExecuteQuery()

For Each map As Microsoft.SharePoint.Client.Folder In mappen.Folders

     item = New ListViewItem(map.Name, 1)

     ListView1.Items.Add(item)

Next map
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,350
Location
Sydney, Australia
Programming Experience
10+
I would suggest that you explore that Folder class a bit and see what information it exposes. I've never used it and the documentation doesn't indicate that there is a property specifically to indicate whether that folder is hidden or not. It does have a Properties property, which is type PropertyValues. That's probably the first place that I'd look, but you should use the debugger to explore the Folder objects thoroughly. The debugger is there for a reason. It can provide a plethora of information about your app as it is running. Don't ignore it.
 
Top Bottom