Answered by:
Explorer View Hidden Folder Attribute

Question
-
I'm looking to hide and unhide folders in the WebDAV Explorer View programatically through powershell. This would be done when scripting site creation. Is there a file attribute for sites, libraries, and library folders which sets the hidden value?
Thanks
Andrew
Thursday, February 13, 2014 4:21 PM
Answers
-
Hi Andrew,
We can use the following JavaScript code to hide SharePoint site, library and folder object in WebDAV Explorer View, see more information from below article.
#folder can be site, library level and folder level $folder = (Get-SPWeb http://sp).Folders["shared documents"].SubFolders["folder1"] #hide folder $folder.Properties["vti_winfileattribs"]="00000016" #show folder ####$folder.Properties["vti_winfileattribs"]="" $folder.Update()
ThanksDaniel Yang
TechNet Community Support- Marked as answer by Miles Li - MSFT Wednesday, February 26, 2014 8:25 AM
Monday, February 24, 2014 11:51 AM
All replies
-
Hi Andrew,
We can use the following JavaScript code to hide SharePoint site, library and folder object in WebDAV Explorer View, see more information from below article.
#folder can be site, library level and folder level $folder = (Get-SPWeb http://sp).Folders["shared documents"].SubFolders["folder1"] #hide folder $folder.Properties["vti_winfileattribs"]="00000016" #show folder ####$folder.Properties["vti_winfileattribs"]="" $folder.Update()
ThanksDaniel Yang
TechNet Community Support- Marked as answer by Miles Li - MSFT Wednesday, February 26, 2014 8:25 AM
Monday, February 24, 2014 11:51 AM -
Thanks, this worked! It was the $folder.Update() part that I was originally missing. This command is perfect for what I needed.Thursday, February 27, 2014 8:34 PM
-
I am receiving this, please help.
Best Regards, DC
Tuesday, February 25, 2020 10:21 AM