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 »

Stef123 wrote:Hmm, that may be, but with this reasoning XY has faulty design to start with.
Not at all. It works well for thumbnails stored within the folder, but just wasn't designed to be portable or entirely XY contained.

In fact, neither the folder.* or desktop.ini support were features designed for XY - they were both features of WE that users requested XY replicate. Microsoft did all of the designing, for better or worse. ;)
Stef123 wrote:If such a name really existed already, I'd see it when creating my own.
Why not wait and see how often you run into this possible conflict first? No need to overreact and blow this out of proportion if, just like folder.jpg, you never run across a desktop.ini with specified Logo.


Or why not design a new feature request that handles the issues of customizing folder thumbnails?

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

TheQwerty wrote: No need to overreact and blow this out of proportion
Easy for you to say. I am facing a whole avalanche of custom desktop.ini. My clients are in the graphcis business, these people thrive on their thumbnails. I had no clue I am not seeing my own thumbs anymore, it looks just as usual, because I duplicated most of them, to see them in XY as well. No time to explain the details where and why I chose different ones that I don't get to see anymore, w/o being aware of it.

I won't be pushing it to have it my way, so can we drop the overreacting and you tell me how I would go about setting up CFI or PFI?

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

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

Stef123 wrote:I am facing a whole avalanche of custom desktop.ini.
Before now you hadn't said anything about encountering this in actual usage, only in your brief test.
Now you're claiming you've run into a "whole avalanche" of them.
:?
Stef123 wrote:...and you tell me how I would go about setting up CFI or PFI?
Disable Show folder thumbnails to prevent XY from using any of the above-mentioned sources.
Now follow the documentation to create CFI/PFI definitions so that these folders have your specified icons.

If you want to also remove all of the system specified (registry, desktop.ini, etc) folder icons you can do something like the following to replace them with your own icon (keep the second line last):

Code: Select all

XYplorer\><xy>
*:\*\;\\*\*\><xypath>\xycopy.exe
Or if you want to also blow away all of the drive icons shorten it like so:

Code: Select all

XYplorer\><xy>
*\><xypath>\xycopy.exe
In both of these the top line is just an example of a custom icon you might set.

If you have the desire and spend the time making decent icons you could even make them look more like XY's thumbs.

Only real differences to the thumbnail approach is that custom icons are used in many more places than just the list thumbs and you cannot MDBU for a larger preview.

You're welcome.

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

@TheQwerty
Why are you mocking me? I do not suddenly "claim" to be affected. I ran a quick test to check up on this, how it applies to my folder thumbs that I've created over the past months.

You quote me like I was bad-mouthing XY's support for folder.jpg. What I really said, however, was that I am happy with it. I had no objections at all. In fact, it was YOU who advised me to not use folder.jpg
TheQwerty wrote:[ It works well for thumbnails stored within the folder, but just wasn't designed to be portable or entirely XY contained.
Doesn't this contradict what you said earlier?
Why would folder.jpg be less portable than desktop.ini with its hard-wired path and drive letter?

I think we're having a communication problem. I don't understand how to use CFI as an alternative to folder.jpg. It seems different from custom folder thumbnails altogether?

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Choose any image within folder as custom thumbnail image

Post by PeterH »

Isn't portable if you don't modify something on the "destination" computer.

And that is also *not* to define or change files (*.jpg, desktop.ini) in local folders.

So the "portable concept" doesn't seem to fit here.

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

Thanks Peter,
portable as related to folder thumbs rules out hard-wired paths, same thing as with XY's portable tags. I agree it were even better to also not touch the host as you suggest. But that's not the case, neither with .ini nor folder.jpg. Maybe CFI offers truly portable thumbnails? Could you shed some light on how to set it up as a folder.jpg replacement?

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

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

Stef123 wrote:Why are you mocking me? I do not suddenly "claim" to be affected. I ran a quick test to check up on this, how it applies to my folder thumbs that I've created over the past months.
Not intending to mock.

My reading of your first posts was not that you had run into 'desktop.ini' being preferred to 'folder.jpg' but that you were afraid you might.

Which is why I said 'why not wait and see how often you run into this possible conflict' of desktop.ini being set - because thus far it hadn't sounded like you'd ever seen it in the wild. Your reply to that was that you're seeing 'a whole avalanche' of them.

Stef123 wrote:In fact, it was YOU who advised me to not use folder.jpg
You expressed concern messing with your clients' desktop.ini files and changing their systems. My impression of your use case is that you're working on a client's machine and you have been using 'folder.jpg' to easily spot their folders and improve your workflow.

My assumption was that your goals are:
1) Minimally modify the client's system.
2) Easily identify folders that you are working with.
3) Avoid conflicts with the client's configuraiton.
4) Have a solution that is portable across machines.

And that you cannot really achieve #4 given that all current folder thumbnail solutions require files in the folder. The folders themselves are portable, but having say 'MyFolder' on every machine show the custom thumb requires customizing the folder on every machine (which I would say is a non-portable solution). As PeterH said, generally portable means not changing the host machine.

My point was that using 'folder.jpg' is still changing their systems. What I was trying to express is that neither the 'folder.jpg' nor the 'desktop.ini' approach are particularly good solutions at meeting those goals.
They clearly satisfy #2. Partially satisfy #1, but an ideal solution would require zero changes. No guarantee on #3 but thus far you apparently haven't had issue using 'folder.jpg'. And as described above XY's offerings cannot satisfy #4.

Stef123 wrote:
TheQwerty wrote:[ It works well for thumbnails stored within the folder, but just wasn't designed to be portable or entirely XY contained.
Doesn't this contradict what you said earlier?
Why would folder.jpg be less portable than desktop.ini with its hard-wired path and drive letter?
My point was that I don't consider either to be portable solutions.


Stef123 wrote:I think we're having a communication problem. I don't understand how to use CFI as an alternative to folder.jpg. It seems different from custom folder thumbnails altogether?
Given the above goals it meets all 4.

#1 - The customization is done entirely in XY so nothing on the client's machine needs modified.
#2 - A custom icon should 'pop' just as much as a custom thumb.
#3 - Since it's entirely within XY there's no possibility of conflict.
#4 - It goes whereever your XY config goes.


Since it seems my assumptions of your goals is wrong - may I suggest you outline what it is you're trying to accompilsh and doing (pre-desktop.ini) in a new thread?

Then if I think it's still possible to achieve with CFI instead of custom thumbs I'll explain how.

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

I am glad we're back on less sarcastic grounds. All your assumptions are correct.
It's a tough pill to swallow but I will ditch my folder.jpg and follow your advice. Please proceed with CFI. Been trying to figure it out, but all I read in help concerns generic patterns like "pics\" - I couldn't find anything that allows me to tie it to actual folders. Please guide me. Thanks.

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

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

First, prevent XY from showing thumbnails for folders by unchecking Configuration > Preview > Thumbnails > Show folder thumbnails. Don't worry files will still have thumbnails.

While in the configuration enable custom icons by checking Configuration > General > Refresh, Icons, History > Icons > Enable custom file icons. There's also a toolbar button if you want to toggle this more quickly.

Now I suggest you read up on Custom File Icons and download the sample icons that Don provides there. As Don said you should extract that archive into your <xyicons> folder.

You are now ready to define your custom icons so open Tools > Customize File Icons....

The general pattern for a definition is:

Code: Select all

"Caption" Pattern>Icon
The caption is optional but it's good practice to use it like a comment for your future self.

The pattern rules are pretty well explained in the documentation, and are very similar to PFA/POM as they are tested against the path and name.

Some examples for matching folders, using the icons from that CFI_Icons archive:

Code: Select all

+"Folders ending with XYplorer" XYplorer\>xy.ico
+"Folders named Data" \Data\>Tree.ico
+"Folders containing bug" *bug*\>bug.ico
+"Folders starting with Apple or i" *\Apple*\;*\i*\>apple.ico
+"The folder Src if it is a descendent (but not child) of Project" *\Project\*\Src\>Help.ico
+"The folder Src if it is a child of Project" *\Project\Src\>Board.ico
+"The specific folder C:\Awesome" C:\Awesome\>Icon_204.ico
+"The folder Bookmarks in the root of XYplorer's drive" ?:\Bookmarks\>Bookmark_Red.ico
+"Folders in the current user's directory" %userprofile%\ /r>Folder_C_Blue.ico|Folder_C_Green.ico
+"Folders in the Windows Directory" %windir% /r>Icon_2.ico
+"All Others (Disable's System Customizations)" \>Icon_6.ico|Icon_5.ico
Click on the Customize File Icons dialog's pencil icon to enter editor mode before pasting these - or you'll have to remove the leading '+' from each line.

Now ideally you should probably use icons which still have folders so that it is easier to distinguish between files and folders, but you'll have to find those on your own. We've had a few users post archives of colored folders here, but I cannot find them now.


I like to keep the following disabled items in my list for reference:

Code: Select all

"Exclude From Customization (omit icon)" example
"----- Keep above at top ----"
"Files without Extensions" *.>ico
"Files of Unknown Type" *?>ico
"Folder (must end with \)" example\>ico
"Folder Normal|Selected" example\>normal.ico|selected.ico
"Switch: Prefer Desktop.ini to CFI" example\ /d>ico
"Switch: Recursive" example\ /r>ico
"------ Keep below at bottom -----"
"Generic Folder" *\>ico
"Generic Current Folder" **\>ico

Good start?

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

As much as I appreciate your instructions - this is the same I already read in help. We're back at square one - I just don't see how this is supposed to replace folder thumbs ?????

As I keep trying and re-editing this posting, I think we're back at our initial mix-up of terms. I expected something like
<curpath>\<subpaths>\>folder.jpg
- to help me identify people, places, products - the real stuff what thumbnails are all about, not abstract icons. Do you suggest converting my folder.jpgs to folder.ico? Storing them as generic icons?
Then how does XY know whether I have mounted \html\images of UserA or \html\images of UserB?

Sorry for being so dense, but I am just not getting it.

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

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

Stef123 wrote:- to help me identify people, places, products - the real stuff what thumbnails are all about, not abstract icons. Do you suggest converting my folder.jpgs to folder.ico? Sorry for being so dense, but I am just not getting it.
I have no idea what your folder.jpgs actually contain so I cannot say one way or the other whether they would work well as icons, but you do have to use icons since XY will not convert images.

However, you are free to use whatever icons you want.
If you don't want them to be abstract then create more representative ones.

For example...
I just created these icons rather quickly using the portable versions of GIMP and IcoFX*:
screenshot.45.png
That even shows how you can make the icon look more like a folder thumbnail by adding a gradient background.



* Steps:
  1. In GIMP: I opened a square image I wanted to use.
  2. Created a new layer bigger than and behind the image.
  3. Filled it with a gradient.
  4. Flattened the layers.
  5. Resized the entire image to 256x256.
  6. Exported as jpg.
  7. In IcoFX: I used batch process to create icons from images using exported jpg.
To see the attached files, you need to log into the forum.

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

Thanks. This looks indeed promising. NOW we're talking. :appl:
It's a lot of work but I am confident to find some pundit who can batch-convert all my folder.jpg to .ico with some kind of Search+Replace script. This will indeed bring back my folder-thumbs. :tup:

The only thing left now is the path component. How do I point XY to these ico-files in their respective folders? The only CFI I have used so far are generic icons, applicable across users and systems and companies. What's the syntax to insert placeholders to make XY content-aware of the specific data at hand?

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

Re: Choose any image within folder as custom thumbnail image

Post by TheQwerty »

I think you're better off keeping all of the icons in one place rather than littering them around your clients' computers but...

The icons can be anywhere you just have to specify the correct path - be it relative to <xyicons> or the absolute path - but you cannot very easily specify a path relative to the folder itself. (If you use environment variables this actually is possible but I'm not going to go into that.)

The one caveat to this though is that XY cleans the internal list of definitions and ignores entries whose icons do not exist.

For instance:
  1. Given the CFI: 'C:\Projects\>C:\Projects\icon.ico' - so long as the icon 'C:\Projects\icon.ico' exists this will work fine.
  2. Close XY.
  3. Rename 'C:\Projects\icon.ico' to 'C:\Projects\icon-old.ico'.
  4. Start XY - the CFI will not work because internally the definition is ignored.
  5. Rename 'C:\Projects\icon-old.ico' back to the original 'C:\Projects\icon.ico'.
  6. Notice that XY will not start customizing the folder at this point - you must force a refresh of the internal definitions.
  7. Restart XY or open the Customize File Icons... dialog and press OK.
  8. Now the custom icon should be working again.
So if you mount those folders after starting XY you'll need to perform step 7 to get them to show.

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

I can do the manual refresh every time, no big deal.
TheQwerty wrote:I think you're better off keeping all of the icons in one place rather than littering them around your clients' computers
I don't think this is possible without violating our prerequisites, what you numbered #2 - identifying the folder I work with, and #4 - being portable across machines. How else would I avoid seeing a (wrong) generic icon for say, C:\Windows\Web\Wallpaper everywhere - irrespective of version or config or company - instead of the true icon that's really there?

Anyway, here's the last little thing I need to finalize it: A placeholder that allows me to pull my folder.ico from their respective containers. I am halfway there with <curpath>, but I am missing the final placeholder to specify the respective subfolders.

Stef123

Re: Choose any image within folder as custom thumbnail image

Post by Stef123 »

Still stuck at the path placeholder problem. Could someone help me out please?
In a nutshell: The idea is to use CFI to get folder thumbnails, in lieu of folder.jpg. I managed to convert my jpg-thumbs to ico-thumbs. But now I am stuck at the path component. XY does allow me to use <curpath>, but it seems to hardwire the path after its initial setup. It won't adapt dynamically to the real location when I move on to another machine or hard drive.

Post Reply