Would it be possible to add a numerical sorting option to recognize roman numerals? Currently, I have a folder that lists I, II, III, IV, IX, V.
Thank you for your time.
Would it be possible to add a numerical sorting option to recognize roman numerals? Currently, I have a folder that lists I, II, III, IV, IX, V.
Thank you for your time.
How would this option know when something was a roman numeral?
Only if it's the last word? (But presumably you'd want "Star Wars Episode I: The Phantom Menace" to work as well.)
Either way "Me, Myself and I" would end up sorted as "Me, Myself and 1" because there's no good way to know that I shouldn't be interpreted as a roman numeral. That could have some strange and unexpected results.
I would only use this to sort select folders. I only have a few folders where I would want Roman Numeral numerical sorting implemented. I would like to be able to set a folder manually to recognize Roman Numerals. That way, the software wouldn't have to detect the folder type or think for itself, if that makes sense.
If you don't mind having an extra column showing when in those folders, and sorting by it instead of the Name column, then this could be done now using a script column.
(The column could display anything you want, including the unchanged names or just empty space, but would need to be added to the file display in order to sort by it. Scripts can set an invisible "sort by" value which is used instead of the displayed string when sorting by their columns.)
Since I don't see a roman numeral script, and I don't know how to create one, I guess I'll just go without. Thank you for your time.
I can make it for you, it should be fairly simple, but it's only worth making if it would still be useful with the limitations I mentioned.
Would it? Or would the extra column get in the way?
I use the Commander dual display view by default. By using your script, would only one of the displays have the third column that you're referring to? Would the script remember that specific folder containing Roman Numerals, or could I specify the folder myself?
The script would provide a column which you can add and sort by in any folders you want to use it in.
You could save folder formats for the paths you want to always add & sort by the column.
Here's the script: Column - Roman Numerals for sorting names.
Thank you for making that script for me, but IX is still appearing before V. I prefer to view by list instead of details. However, for this roman numeral folder, I changed to details view, added the roman numerals column, and chose to sort using them. I've attached a screenshot to illustrate my problem.
The script splits words on spaces not dots, so it's not doing anything at all with those filenames.
If you edit str.split(" ") and change it to str.split(".") it will work with that type of name, I think.
Change the out += " " to out += "." just below that line, too (although it isn't essential).
Wow!! It works perfectly now. Thank you so much for all of your help.
I only added the "." to the script, which worked for my needs. What would "Change the out += " " to out += "." just below that line" do?
If you look at the column, all the dots will be spaces in what it displays, since it's splitting words on dots and then joining them back together with spaces. Maybe in this case that's actually a good thing, so it's up to you if you leave it or change it.
Glad it's doing what you want!
OK, I understand. It's not necessary for me to make that second edit. Thank you again for all of your help. I really appreciate it.