(...) too much work for thousands of folders (...) In win explorer you can just assign a pic.
Right, but even assigning a shortcut gives work ...
Another method :
Select a first photo in a "jpg" or a "raw" subfolder for example
Tools > Batch convert
in "Output" tab", Filename field, type : folder
in Folder selection field, type .. (dot dot, that will create a "folder.jpg" picture in parent folder)
See also Format area, if you need to change output format from raw to jpg and quality settings, and disable copying metadata .
Unmark "preserve metadata"
in "Actions" tab, add an action , "Image > Resize" , and choose for Width Heigt something like 200 x 200 to save space
in "Input" tab, browse a subfolder for each parent folder , and select a photo in each one ... (it's as long as creating shortcuts

)
"Convert" ...
I made a few tests, seems OK, but be careful and try this for a small number of places
Edit 1 : maybe easier
- First, "tag" the photos you want to become thumbnails. (if you are using tags for other purposes you can use a color label instead)
- In Categories filter, select "tag" (tagged pictures) (or color label)
- Select all the photos you have got and apply Batch convert the same way I wrote above. (The "input" tab is now automatically filled)
With this method, you can renew thumbnails by adding or removing tags, and launch batch convert.
Edit 3 :
For my own use, I had already assigned a category like "iconic" to a few photo in some subfolders. Today, I filtered this category to create my "folder thumbnails"
It is thanks to the questions in this forum that I have often improved my use of XnviewMP !
Edit2 :
If one wants to use "4 thumbnails" for folders , you can tag up to 4 photos for each parent folder, and use any output filename (but different from "folder.jpg" ). Use for example thumb# so that thumb1.jpg thumb2.jpg thumb3.jpg thumb4.jpg will be created.
- To update folder thumbnails, select them and use View> Rebuild thumbnails