How to apply view settings of library to subfolders?

Page 1 of 2 12 LastLast
  1.    #1

    How to apply view settings of library to subfolders?


    On windows 1809, with sfc.scannow giving no error, I run
    Reset_Folder_View_Settings_of_All_Folders_to_Default(1).bat
    in order to reset everything
    then I run
    All_Folders_Use_Documents_Folder_Template(1).bat
    in order to make all folder views as document
    then I create my custom view and I apply it to all the folders

    This works great, but not for library. Even worse, when I create a custom view for a library, the subfolders of this library do not inherit the custom view...
    So how do I force the subfolder to be displayed like the parent folder ?

    So now the geniuses at Microsoft claim that subfolders of a library must not inherit the view of the parent folders?

    why would they want that?
      My ComputerSystem Spec


  2. Posts : 173
    Microsoft Windows 10 Home
       #2

    You're talking about the real Libraries, right? (some people refer to the User folders under This PC as libraries). Unfortunately, they use a different template than the regular file folders (Documents.LibraryFolder rather than Documents):
    Click image for larger version. 

Name:	Screenshot (341).png 
Views:	5 
Size:	199.0 KB 
ID:	229263
    It requires some registry magic to modify Library templates. I have a script that we can modify for your particular needs, but I have to get to work. Will post more this evening. If you check out some of my other posts regarding folder views, you'll get some background on what I'm talking about.

    Keith
      My ComputerSystem Spec

  3.    #3

    I mean the usual library of Documents, videos, Music, PIctures.
    Click image for larger version. 

Name:	sshot-634.jpg 
Views:	2 
Size:	123.3 KB 
ID:	229279


    On windwos 8, the folders inside a LIbrary (eg, of DOcuments) inherit the view of the DOcuments-as-LIbrary, but not in w10...




    What I like about the libraries is that they put the folders first, then the files, irrespective of the ordering chosen?, whereas the folder ''DOcuments'' mixes files and folders, in the ordering that I like (=modified date), so the view is more confused...
      My ComputerSystem Spec

  4.    #4

    Now for the view that I like for the Libraries (any library):
    -first, the ordering is date modified, with the recent date first, then the old dates
    -second, the columns that I want on any library and any folders and subfolders of any library:
    name, size, modified date, type, attributes, dimensions, duration (on french windows, there are two ''duration'', it is the first one (for videos duration))

    on windows 8, I right click on a column and choose ''adjust all the column automatically'', then I fine-tune the ''name'' column. THen I am satisfied.

    - - - Updated - - -

    KeithM said: View Post

    Keith
    I search for Documents.LibraryFolder in registry, but I could not find anything. Can you share your program to modify the view of any library ?
      My ComputerSystem Spec


  5. Posts : 173
    Microsoft Windows 10 Home
       #5

    I'm working on it. Misplaced my glasses the night before last and couldn't work at the computer. Want to test my code before posting.

    Keith
      My ComputerSystem Spec


  6. Posts : 173
    Microsoft Windows 10 Home
       #6

    This is turning out to be trickier than I thought. The script is modifying all the values I thought needed to be modified. But Music & Picture Libraries aren't showing the right columns. Documents, Generic, and Video Libraries are. Here's the code as it stands, if you want to try it. Sign out and sign back in after running. Also remember that any folder you've already viewed will have its individual view settings saved and won't use the template. I'm going to keep investigating, but time is limited during the week.
    In the CustomColumns list, the values in parentheses specify column width. So it may take some trial & error to find the column widths you like.
    Code:
    $CustomCplumns    = @(
    'prop:0(34)System.ItemNameDisplay'
    '0(10)System.Size'
    '0(15)System.DateModified'
    '0(15)System.ItemTypeText'
    '0(10)System.FileAttributes'
    '0(10)System.Image.Dimensions'
    '0(10)System.Media.Duration'
    ) -join ';'
    $SortByList       = 'prop:-System.DateModified;System.ItemNameDisplay'
    $HKLM_FolderTypes = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
    $HKCU_FolderTypes = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
    Remove-Item $HKCU_FOlderTYpes -recurse
    copy-item $HKLM_FolderTypes "$(split-path $HKCU_FolderTypes)" -Recurse
    gci $HKCU_FolderTypes -Exclude '{524ddb2b-2a4f-43b8-b8fe-e91ef9d8ba69}' |
         ?{(gp $_.PSPath).CanonicalName -match 'Library$'} |
          %{         $FolderTV = (gi "$($_.PSPath)\TopViews").OpenSubKey('{82ba0782-5b7a-4569-b5d7-ec83085f08cc}', $True)
             $ColumnList = $FolderTV.GetValue('ColumnList')
             $ColumnList = $ColumnLIst -replace '^.+?(?=;1)', $CustomCplumns
             $FolderTV.SetValue('ColumnList', $ColumnList)
             $FolderTV.SetValue('SortByList', $SortByList)
             $FolderTV.Close()
          }
      My ComputerSystem Spec

  7.    #7

    This code works well. THre is indeed the video library which skips some columns.

    Do you know how to reset any library view, so that any previous custom view is reset ? I tried the file
    Reset_Folder_View_Settings_of_All_Folders_to_Default(1).bat
    but that has zero influence on the library.


    FOr the size of a column, most are fine. For NAME, I set the size to 1305 pixels. Do you know how to convert this value to whatever is used in the code ?
      My ComputerSystem Spec


  8. Posts : 173
    Microsoft Windows 10 Home
       #8

    This code will remove individual saved views for Libraries:

    Code:
    $LibViews = @(
    '{0b2baaeb-0042-4dca-aa4d-3ee8648d03e5}'
    '{292108be-88ab-4f33-9a26-7748e62e37ad}'
    '{3f2a72a7-99fa-4ddb-a5a8-c604edf61d6b}'
    '{3f98a740-839c-4af7-8c36-5badfb33d5fd}'
    '{524ddb2b-2a4f-43b8-b8fe-e91ef9d8ba69}'
    '{5f4eab9a-6833-4f61-899d-31cf46979d49}'
    '{631958a6-ad0f-4035-a745-28ac066dc6ed}'
    '{654a1b99-8a4b-4e7b-a4e1-46378ad77a61}'
    '{978e0ed7-92d6-4cec-9b59-3135b9c49ccf}'
    '{c1f8339f-f312-4c97-b1c6-ecdf5910c5c0}'
    '{da3f6866-35fe-4229-821a-26553a67fc18}'
    '{fbb3477e-c9e4-4b3b-a2ba-d3f5d3cd46f9}'
    )
    $Bags = 'HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags'
    gci "$bags\*\*\*" | ?{$_.PSChildName -in $LibVIews} | remove-item
    Will post more tonight....

    Keith
      My ComputerSystem Spec


  9. Posts : 173
    Microsoft Windows 10 Home
       #9

    I've never found documentation on the column width units, but (on my system at least), here's what I found with setting different values & then checking the width in the 'Choose columns' dialog in Explorer:
    25 = 281
    26 = 293
    27 = 304
    28 = 315

    Keith
      My ComputerSystem Spec

  10.    #10

    KeithM said: View Post
    This code will remove individual saved views for Libraries:

    Code:
    $LibViews = @(
    '{0b2baaeb-0042-4dca-aa4d-3ee8648d03e5}'
    '{292108be-88ab-4f33-9a26-7748e62e37ad}'
    '{3f2a72a7-99fa-4ddb-a5a8-c604edf61d6b}'
    '{3f98a740-839c-4af7-8c36-5badfb33d5fd}'
    '{524ddb2b-2a4f-43b8-b8fe-e91ef9d8ba69}'
    '{5f4eab9a-6833-4f61-899d-31cf46979d49}'
    '{631958a6-ad0f-4035-a745-28ac066dc6ed}'
    '{654a1b99-8a4b-4e7b-a4e1-46378ad77a61}'
    '{978e0ed7-92d6-4cec-9b59-3135b9c49ccf}'
    '{c1f8339f-f312-4c97-b1c6-ecdf5910c5c0}'
    '{da3f6866-35fe-4229-821a-26553a67fc18}'
    '{fbb3477e-c9e4-4b3b-a2ba-d3f5d3cd46f9}'
    )
    $Bags = 'HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags'
    gci "$bags\*\*\*" | ?{$_.PSChildName -in $LibVIews} | remove-item
    Will post more tonight....

    Keith
    I confirm this works on windows 1809

    - - - Updated - - -

    well the code to reset the view worked yesterday and now it does not work :d

    - - - Updated - - -

    this is what I have after I apply the code to reset the library view and the code to reset the folder view

    Click image for larger version. 

Name:	sshot-660.jpg 
Views:	3 
Size:	253.3 KB 
ID:	229761
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
I have a folder which contains subfolders. The subfolders contain videos. I'd like to see thumbnails of all the videos in the subfolders without having to go into each one. Is there a way to do that?
So every time I change the view type of either my programs library or downloads library, they affect each other changing the other libraries view type as well. To further baffle me, when I browse other libraries and go back to either downloads or...
I've been reading up on applying Folder View settings to either All Folders or all folders of the same type, but neither of those is quite what I'm looking for. Specifically, I'd like to write my own utility that reads the folder view settings...
How do I apply a view, specifically the "list" view, to only all of the subfolders of a folder without changing each one individually.
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 14:57.
Find Us