Choose any image within folder as custom thumbnail image?

Features wanted...
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

<curpath> won't work but you could do C:\Customized\Folder\>C:\Customized\Folder\icon.ico and place icon.ico in every client's C:\Customized\Folder\ directory for each customized folder.

As far as using dynamic paths you have a few options...

You can use any existing environment variable (or your own) so you could use %computername% and then reference the icon by %computername%\icon.ico to get the icon <xyicons>\ThisIsMyComputerName\icon.ico.

Similarly you can use the current user name (of the thread) by using %user%\icon.ico or <get username>\icon.ico.

You could also start XY with the /user command line switch (i.e. /user=Client_Ben) and then use <get cmdlineuser 1>\icon.ico to get the icon <xyicons>\Client_Ben\icon.ico.

You could also define an alias @client=Client_Ben and then use <get alias client>\icon.ico to get the icon <xyicons>\Client_Ben\icon.ico.

All of these do require that you open and OK the customize file icons dialog to refresh the icon paths. However, one nice thing about using the alias is you can change the client value without restarting XY.

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

Hmm, first off, thanks for not leaving me stranded.
If I read you correctly, there is no way to dynamically access the folder for which I store the icon? :eh:
All your suggestions boil down to storing the thumbnail someplace else, then linking it to each subfolder on all machines and drives by hard-wiring the subfolders literally? :? :veryconfused:

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

Stef123 wrote:Hmm, first off, thanks for not leaving me stranded.
If I read you correctly, there is no way to dynamically access the folder for which I store the icon? :eh:
All your suggestions boil down to storing the thumbnail someplace else, then linking it to each subfolder on all machines and drives by hard-wiring the subfolders literally? :? :veryconfused:
You cannot use <curpath> in an icon definition unless you open and OK the CFI dialog after every browse to get the path to update. But one of your original goals was to avoid littering the client's machine with your customization files, so I'm not sure why we're back here.

My suggestions provide multiple options to allow for using different icons for the same folders based on some other dynamic value (client's machine/name). By layering your definitions you can also create fallbacks for cases where you don't define things on a per-client basis:

Code: Select all

+"Per Client Customization" C:\Projects\Src\><get alias client>\User.ico
+"Fallback" C:\Projects\Src\>Acorn.ico
At this point I feel I've sufficiently demonstrated how you can use CFI as an alternative, not 1-to-1 replacement, to folder thumbs, and shown how it can solve all four of the above-mentioned goals.

admin
Site Admin
Posts: 66719
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Choose any image within folder as custom thumbnail image

Post by admin »

TheQwerty wrote:I agree that the order should actually be:
<curitem>\folder.jpg
<curitem>\folder.png
<curitem>\folder.gif
<curitem>\desktop.ini>[ViewState]>Logo
<curitem>\*.jpg
Makes sense to me.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

admin wrote:
TheQwerty wrote:I agree that the order should actually be:
<curitem>\folder.jpg
<curitem>\folder.png
<curitem>\folder.gif
<curitem>\desktop.ini>[ViewState]>Logo
<curitem>\*.jpg
Makes sense to me.
Ehh.. looking again I'm not so sure as it truly depends on the goal of XY.

If it's to appease backwards compatibility then the above makes sense since desktop.ini support came later but is more specific than '*.jpg'.

If it's to mimic WE then (at least in 7) it should be:
<curitem>\desktop.ini>[ViewState]>Logo
<curitem>\folder.jpg
??? (It seems to use some algorithm to show multiple images based on use or something?)
EDIT: This actually also makes some sense since 'folder.jpg' doesn't make it clear that the user explicitly picked that image as the thumbnail in the way that desktop.ini does. It could just be an accurately named picture of a folder. /edit.

But since folder.png/folder.gif are extensions of folder.jpg they should be above the algorithm, and since XY doesn't know the algorithm using *.jpg is fine. In all that means the behavior that is in XY v14.80.0236 is already correctly mimicking WE.

Which is better depends on who is being asked.
*shrugs*

admin
Site Admin
Posts: 66719
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Choose any image within folder as custom thumbnail image

Post by admin »

Here's a *shrugs* from me too:

1) I rethought it and, feeling like an idiot (but I don't care too much), I now think that yes, the original order was alright (too). The "desktop.ini" way is most specific and Explorer standard, so it should overwrite the other ways, also because:
2) If it worked as well as I thought it would (but see 3) I would even think about removing those "folder.jpg/png/gif" etc ways -- they are weird and problematic.
3) However, I made some tests with Explorer (Win8.1), and it does not seem to create nor honor desktop.ini. Which is weird because I could have bet that I tested this in January when I added that feature. ... 5 minutes later: now it works in Explorer in one folder, but not in another.

I give up at this point (or I get a relapse).

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

I wish I could join the shrugging - but this whole thumbnail business has eaten up an uncanny amount of time to just shrug it off one way or the other. Now that I got the other issues solved thanks to scripts and Don's reworks and refresh features - now my folder thumbs have stopped working. :evil:

I don't mind a software doing things differently. When I learned I had to use folder.jpg instead of right-clicking the folder and choosing an image - I began to like it even better. Folder.jpg allows to secure my own thumbnails when using XY, which is why I call it more specific, not less, from my POV within XY. Same thing as PFA and CFI imo, which also override Windows customizations.

I don't care who invented folder.jpg - it worked for me and now it doesn't. Turns out I should have used CFI instead, but this was not obvious from the help file, and it is not easily set up to match the title of this thread.

@TheQwerty
I didn't mean to waste your time, feeling exhausted myself how much effort it takes to get back my folder thumbnails. I have no problems converting them to ico, but the path is still puzzling me. I still see no other way to access <curpath>\xyz\folder.ico other than hardwiring "xyz" for each and every folder I want a thumbnail for.
TheQwerty wrote: But one of your original goals was to avoid littering the client's machine with your customization files, so I'm not sure why we're back here.
I never said this. Littering clients' machines with hidden folder.jpgs was what I did before, the method I was happy with. Messing with the client's ini-files is what I cannot do.

admin
Site Admin
Posts: 66719
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Choose any image within folder as custom thumbnail image

Post by admin »

If a new feature spoils your current setup just let me know. This should not happen, and it's easy to add a tweak to turn it off. (I simply did not expect that anybody would use folder thumbs so heavily.)

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

:?: :?: :?: :arrow: :tup: :!: :arrow: :D
Umh ... yes .... I am bit taken aback by the sudden ease of operation :o but in a very positive way :beer:
The new handling does indeed interfere with my current setup. To an extent I am scared to even estimate because I have accummulated massive amounts of folder.jpgs. And most machines I work with are swamped with desktop.ini. Which is why I didn't notice the problem straight away. I still get to see folder thumbs, although different ones than what I could have sworn I had set up months ago, which is why the visual scanning of folders often fails me.

So yes, if it's this easy to bring back the old behavior - please do it. :appl:
I just wish you had intervened earlier. I was under the impression you guys are working in unison, so to speak, moderators having the same clout than you do. Basically, I've been taking it for granted that you're reading along with implicit agreement unless you voice a different course of action. Anyway, I am more than happy to hear this knotty issue can be solved so easily.

admin
Site Admin
Posts: 66719
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Choose any image within folder as custom thumbnail image

Post by admin »

Normally yes, but the last 10 days I was in clinch with a nasty flu and totally out of order. :evil:

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

Stef123 wrote:
TheQwerty wrote: But one of your original goals was to avoid littering the client's machine with your customization files, so I'm not sure why we're back here.
I never said this. Littering clients' machines with hidden folder.jpgs was what I did before, the method I was happy with. Messing with the client's ini-files is what I cannot do.
The goals I outlined and you said were true included all modification of the clients' machines. This was not limited to just modifying ini-files. Placing a 'folder.jpg' is in many ways just as big of a modification as modifying their 'desktop.ini'.
Stef123 wrote:I still see no other way to access <curpath>\xyz\folder.ico other than hardwiring "xyz" for each and every folder I want a thumbnail for.
It depends on what you're actually trying to achieve.. can you show an example using multiple CFI definitions?
Then show how you would prefer they be defined.

----

I try to only ever speak about what is currently possible in XY and make it explicitly clear when I'm talking about things that Don would need to change. What Don is capable or willing to do is for he and he alone to declare - though occasionally physics and the laws of nature come into play.

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

@Don
Glad to see you back on the turf, up to par and in full swing.

@TheQwerty
I know you meant well and had best intentions. I was even a bit shocked when you went to such lengths. Didn't mean to cause that much effort. Couldn't shake off the feeling we're veering off topic - that's why I kept asking how this relates back to my folder.jpg problem.
TheQwerty wrote:Placing a 'folder.jpg' is in many ways just as big of a modification as modifying their 'desktop.ini'.
Well no, it's not. Modifying their ini destroys their thumbs, whereas placing my own thumbs doesn't bother them at all. Granted, it MIGHT cause a problem with other clients. But just like you, I have this rather lax attitude of "wait and see how often I actually run into a conflict."

So anyway, I am glad this got resolved and I hope you don't harbor any bad feelings. If my lines carried a strained or irritated undertone, it slipped in w/o my awareness and I apologize.

Megalith
Posts: 87
Joined: 24 Jan 2015 16:53

Re: Choose any image within folder as custom thumbnail image

Post by Megalith »

I haven't been keeping up with this. So is CFI the new method for setting custom thumbnail images? Is there any way to set a non-.ICO file through CFI?

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Choose any image within folder as custom thumbnail image

Post by bdeshi »

XYplorer can now display a folder.jpg,folder.png... or other image file described as folder thumbnail in desktop.ini.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

Megalith wrote:Is there any way to set a non-.ICO file through CFI?
Not that I am aware of.
Using CFI as proposed by TheQwerty in this thread, was an attempt to fix an issue with "wrong" thumbnails. To idea was to bring back existing folder.jpgs by converting them to .ico, to see your correct thumbnails again.

Meanwhile, Don has added a tweak to handle the issue: If you don't want desktop.ini to override your custom folder.jpg, switch them off (the .ini thumbs). You cannot however, let your folder.jpg override .ini thumbs. It's an either-or decision. When opting for your folder.jpg thumbs, you will not see desktop.ini thumbs that may exist. Giving priority to existing folder.jpg thumbs rules out seeing desktop.ini thumbs.

Post Reply