Custom sort order: how do you do it?

Started by sinus, June 16, 2016, 12:44:31 PM

Previous topic - Next topic

sinus

Hi all,

Inspired by the thread of Darlene and Jim (https://www.photools.com/community/index.php?topic=47.msg39162#new) and because I just now must use a custom sorting, I have created this thread.

We have in IM5 a lot of sorting possibilites.
But what, if you like a sort order like in the "good old days", when you switched and placed your slides on a real light table?

In such cases all sort orders of IMatch does not work ...

... well, ecxept the custom sort order.

Basically, if you choose this sort order, you can do it like with slides, you click on one or several images and drag n drop them around.
Great.

IMatch stores such custom sort orders per folder and per category.
Fine.

But to be honest, for me this is a bit too "dangerous", because sometimes I move files, shuffle them, rename them and so on.
Hence I want have a solution, what I think, should work also in such cases (even outside of IMatch).

What do you do in such cases?

My current solution is - I think - quite sure, but maybe there is a better solution out there.

I have normally a filename like this:
20160615-0806-289357-s-coo-text

To sort for date and time is no problem.
But with the custom sort order this is not more helpful. I do is such cases:

- first arrange the files with activated custom sort order, like I wish
- then I let run a small script, this brings the current sorting in a metadata-field. The value looks then like this:
001-9357
002-9432
003-9118

The first part ist the sorting part. The second number is a fraction of the real filename (see below)*
Now I have the wished sort order in a metadata-field, in my case the field {File.MD.XMP::photoshop\TransmissionReference\TransmissionReference\0}
We can now of course do a research, what field could be better. But finally I have one.  ;D And if I see, that I must use another one, it is quite easy to change.

I can now change back to the default sorting.
If I wish now my custom sort order back, I must only change to a sort-order, based on the metadata-field. Easy.
And this works for example also in the "Design & Print"- tool. Nice.

And best of all for me, this information is burried in the DB of IMatch, but if I do store it with the pencil (metadata), then it is stored also in the image itself. Quite save, I think.
BTW: if I must use the same file to several projects with several custom sort orders, I could even do this with the same solution, I could simply choose other metadata-fields and use them as a "placeholder" for the custom sort order, even maybe marked with the project-name:

field 1: privat-001, privat-002 ...
field 2: client-001, client-002...
field 3: moon-slideshow-001, moon-slideshow-002 ...

Should work, but I do this not yet.

So this is my solution.
Has anybody another solution?
Maybe an easier one?

Would be nice, if you could post, what you do in such cases.

* BTW:
I do this numbering:
001-9357

Only the first part 001 is important for the sorting. But the second part 9357 is for me interesting, because sometimes I use then this whole number 001-9357 as the real filename temporarly to send such files to a client.
I do not want, that a client has a long number, hence I hold it as short as possible.
If he asks me about a file, I must ask him simply for the second part of the filename and I am able in my DB to find the related origina file. (It would be even better to use 001-289357, but this number is too long, I think).











Best wishes from Switzerland! :-)
Markus

wgerhartz

#1
Interesting. Could be a solution to my problem. How does that "small script" you describe look like?

In my thread on sort order [/https://www.photools.com/community/index.php?topic=6364.msg43994#msg43994] I describe that consequtive numbering of a metadata field by a metadata template is not done in my custom sort order but apparently in the 'Added' sort order.

Best regards, Wolfgang

sinus

Option Explicit

Sub Main
Debug.Clear

Dim selection As Files
Set selection = Application.GetFileWindow(imfwtCurrent).SelectedFiles
If selection.Count = 0 Then
MsgBox "Please select at least one file."
Exit Sub
End If

Dim f As File
Dim vals As TagValues
Dim data As TagData
Dim kundenname As String
Dim nummer As Long
nummer = 1

For Each f In selection
Set data = f.TagData
Set vals = data("XMP::photoshop\TransmissionReference\TransmissionReference\0")

If vals.Count = 0 Then
MsgBox "Mindestens eine Datei hat keinen K-Dateiname-Eintrag!"
Exit Sub
End If

Dim oldval As String
oldval = vals(1)

vals.Set oldval & "-var-" & Format(nummer, "00")
nummer = nummer +1

data.Update vals
data.WriteBack

Next
End Sub



This works for me.
But please remind: with one of the next version of IMatch, this script-language is not more guilty, it will be deleted.

I am sure, there are several possible solutions, it depends on what you exactly want.
Best wishes from Switzerland! :-)
Markus

sinus

and of course:

try the script first with only 1 image!
Best wishes from Switzerland! :-)
Markus

wgerhartz

Dear Sinus,

I really like your comment: "with one of the next versions of IMatch, this script-language is no more valid."

I have no idea of scripting language and would have to learn it from scratch. Your comment tells me that it is not worthwhile. Thank you.

Best regards, Wolfgang

ubacher

My approach is similar: I use an attribute field and fill it with a script.

My main use is to sort prepared pages that go into a book. I copy the files to a folder and then rename them
using the sort order at the start. e.g. 001 <file name>.jpg
This way the files show in the desired order within Windows if displayed by file name.



sinus

Quote from: wgerhartz on February 28, 2017, 01:09:19 PM
Dear Sinus,

I really like your comment: "with one of the next versions of IMatch, this script-language is no more valid."

I have no idea of scripting language and would have to learn it from scratch. Your comment tells me that it is not worthwhile. Thank you.

Best regards, Wolfgang

;D ;D ;D
Thanks, a nice comment.  :D

If you want lern a good language for IMatch, I think, JavaScript would be interesting.
Best wishes from Switzerland! :-)
Markus