Question Force win11 folders to all show the first image in folder

NaSMaX

Distinguished
Nov 6, 2014
16
0
18,510
Hello Is there a function, .bat file, whatever I can use to force win11 folders to ALL show the first image in the folder as the thumbnail without having to go into each and every folder myself and selecting it? I've used customizergod to make the folder icon better but its still showing random images. Thanks in advance.
 
The requirement being something like this process?

= = = =

How do I create a custom folder image?


How to Change Folder Icons or Pictures in Windows 10 & 11 ...


Right-click on any folder and click Properties. Click on the Customize tab. Click on Choose File... under Folder pictures to change the folder picture.

Source:

Major Geeks link

However; the further requirement being that the process is applied to all sub-folders within the folder as well - correct?

First determine if the process works for and single folder or sub-folder.

And also how is the"1st" image determined? Are the images sorted in a consistent manner?
 
I can speak from experience with this on earlier versions of Windows and even 10 that this features is EXTREMELY flaky in what it does and doesn't want to show. If the image is very large, it won't display it.

As per @Ralston18's instructions is the way to get A image to appear for the thumbnail but I've not seen a method to get it to replicate to all the folders underneath. There may be a 3rd party something that does it.
 
The requirement being something like this process?

= = = =

How do I create a custom folder image?


How to Change Folder Icons or Pictures in Windows 10 & 11 ...


Right-click on any folder and click Properties. Click on the Customize tab. Click on Choose File... under Folder pictures to change the folder picture.

Source:

Major Geeks link

However; the further requirement being that the process is applied to all sub-folders within the folder as well - correct?

First determine if the process works for and single folder or sub-folder.

And also how is the"1st" image determined? Are the images sorted in a consistent manner?
Yeah thats how I do it normally but its on a folder by folder basis and not matter what I do I cannot make it work for all the folders in a folder. It might have something to do with all the folders being read-only but I can't change that either (its reverts to read-only) when I get out of the properties tab. As for choosing the image I click on choose file and just manually choose the first image).
 
My thought is that the process could be done via a Powershell Cmdlet or Script.

Likely straightforward for just one folder but making the script recursive will require more thought and effort.

Plus a full backup of all images and also the creation of of test environment to work in. And the folders may well need to be read/write.

If you are interested in coding then take a look at Powershell.

See what you can find (I found some script) and give it all a try.

Focus on single folder and image file from within that folder. If you get it to work the expand the script to other folders.

What image format are you using? That has to be taken into account. Some of what I found was dependent on .ico format. Some script involved workarounds.

If your code or script does not work then post what you attempted and explain what worked or did not work.

Overall, I am responding as if your question is a homework assignment. Forum rules prohibit doing homework. And even though this may not be homework there is no way to know from this side of the post.

To help you get started:

https://learn.microsoft.com/en-us/p...ng-with-files-and-folders?view=powershell-7.4

Get-ChildItem may prove useful.

More specifically:

https://stackoverflow.com/questions/75999619/how-to-use-powershell-to-set-directory-details


Very doable I think. Just not sure how complicated or cumbersome to implement. TBD.

Work with "Gets" just to learn what you can about the folders and files. Do not do any "New", "Remove", "Set"and so forth where changes are made.

Unless you are working in an expendable test environment which can easily be deleted and re-created.

AKA "do over".