locked
Explorer View Hidden Folder Attribute RRS feed

  • 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.

    http://blogs.msdn.com/b/spblog/archive/2012/04/04/hidden-objects-in-sharepoint-quot-explorer-view-quot.aspx

    #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()
    Thanks

    Daniel Yang
    TechNet Community Support

    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.

    http://blogs.msdn.com/b/spblog/archive/2012/04/04/hidden-objects-in-sharepoint-quot-explorer-view-quot.aspx

    #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()
    Thanks

    Daniel Yang
    TechNet Community Support

    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