Hide from Explorer view
-
29-09-2020 - |
Question
is it possible to hide some folders of a site in the Explorer view?
For example, my site is :
http://mysharepoint/mysite/mysubsite
when I see
http://mysharepoint/mysite
in Explorer I get:
-mysubsite
-Shared Documents
-images
-Lists
-Pages
-SitePages default
I would like that a user see only mysubite and Share Documents from the Explorer view. Is it possible?
Solution
from what i know, the explorer view merely displays results based on user permissions, similarly to SPD
if your user is able to interact with pages, lists and images through the UI, it is not unexpected that he can see the same resources from the explorer
I don't personally believe that there is away to prevent access to these resources, however, there might me a workaround to try to hide them, provided that the user has enabled the windows setting to not display hidden files
this workaround, should you want to try it, at your own responsibility, is to reproduce a default behaviour in which folders starting with underscore are hidden
you may not need to actually rename the folders, as you can enforce the attribute that is added when you do. you can set it to empty to revert the changes
$folder = (Get-SPWeb http://url).Folders["DocLib_Name"]
$folder.Properties["vti_winfileattribs"]="00000016"
$folder.Update()
for a file
$file = (Get-SPWeb http://url).GetFile("/doclib/file.extension")
$file.Properties["vti_winfileattribs"]="00000016"
$file.Update()
again, I haven't tried this so I am not responsible in case your site disappears or your server explodes