Hello,
Here is my use case:
Folder1
--- Subfolder 1
------ Sub-subfolder
--------- Picture1.jpg
--- Subfolder 2
------ Sub-subfolder
--------- Picture1.jpg
--- Subfolder 3
------ Sub-subfolder
--------- Picture1.jpg
Sub-subfolders (in blue) have thumbnails while subfolders (in red) don't have any thumbnails. Considering each subfolder (red) only has one sub-subfolder, is there any way to make it so the subfolders (red) inherit the thumbnails? Or is there a way to generate thumbnails manually and apply them to those subfolders?
Thank you!
Using the thumbnail of the subfolder as the thumbnail of the current folder
Re: Using the thumbnail of the subfolder as the thumbnail of the current folder
One of my scripts helped you out? Please donate via Paypal
Re: Using the thumbnail of the subfolder as the thumbnail of the current folder
Thank you, it is the link at the end of the thread that ended up working for me. I had to modify it a little to actually create the desktop.ini file for images in sub-subfolders:
Edit: actually the relative path doesn't work. I don't understand why as the path is correct. Full paths work.
Code: Select all
foreach($folder, <get SelectedItemsPathNames <crlf>>, <crlf>, "e") {
$image = quicksearch("*.jpg /limit=1", $folder);
if !(exists($image)) { continue; }
$image_relative_path = replace($image, $folder . "\", "");
$desktopIni = $folder . "\desktop.ini";
$content = <<<>>>
[ViewState]
Mode=
Vid=
FolderType=Pictures
Logo=$image_relative_path
>>>;
writefile($desktopIni, $content, , "utf8");
attrstamp("hs", , $desktopIni);
}
status "Done...";
-
klownboy
- Posts: 4397
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440
Re: Using the thumbnail of the subfolder as the thumbnail of the current folder
Over on this thread viewtopic.php?f=5&t=24054 not too long ago, I had wished for the top folder to display the thumbnail of the folder beneath it, if no other options were available like folder.jpg, an image file, or desktop.ini, etc. If it was bought into (it wasn't), you wouldn't have to use a desktop.ini file. When located in your Sub folder1, it would have automatically shown the folder thumbnail of Sub-folder when no images were in Sub folder1. In this case, that folder thumbnail would have been of Picture1.jpg.
Re: Using the thumbnail of the subfolder as the thumbnail of the current folder
As an alternative to desktop.ini, theoretically you could just create symlinks called folder.jpg (or whatever name really) to the subfolder image that you wanted, it could also probz be attr +h.
-
klownboy
- Posts: 4397
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440
Re: Using the thumbnail of the subfolder as the thumbnail of the current folder
Nice idea jupe. It works. I tried it using a link to an image (jpg) and hid it. If a user needs to perform this numerous times, I'd recommend a simple script especially if they wanted to hide link file as well.
Re: Using the thumbnail of the subfolder as the thumbnail of the current folder
A probably slightly more sophisticated script for it (it only uses desktop.ini files, symlinks would require admin permissions)
It works on selected folders or if none are selected on the current path and automatically creates necessary desktop.ini files in all those directories which have a subdirectory with image files in it. So you could use it for even deeper nested hierarchies. Use it at your own risk^^
It works on selected folders or if none are selected on the current path and automatically creates necessary desktop.ini files in all those directories which have a subdirectory with image files in it. So you could use it for even deeper nested hierarchies. Use it at your own risk^^
One of my scripts helped you out? Please donate via Paypal
Re: Using the thumbnail of the subfolder as the thumbnail of the current folder
Windows 11 24H2 @100% 2560x1440
Re: Using the thumbnail of the subfolder as the thumbnail of the current folder
Thanks for everyone's input! Sorry, I forgot about this topic. I'd rather use desktop.ini files instead of symlinks so the current solution works perfectly well for me. Still, I notice that the script you posted (highend) also uses full paths. Is it because relative paths don't work to generate thumbnails for you either?
XYplorer Beta Club