Page 1 of 1
How are you using Custom Columns?
Posted: 22 Mar 2014 21:18
by admin
Here's something that might be useful one day. A column to sort names by the last name:

- LastName.png (26.86 KiB) Viewed 2757 times
The script:
Code: Select all
$base = getpathcomponent(<cc_name>, "base");
$lastname = gettoken($base, -1);
return $lastname;
Maybe you can share your favorite custom columns as well...
Re: How are you using Custom Columns?
Posted: 22 Mar 2014 23:13
by SkyFrontier
Here I am organizing cooking recipes
-they are written as plain .txt;
-Custom Columns are reading paragraphs 3 and 5, containing 'calories *** portions served', respectively.
-with proper left-alignment, they can be sorted 'by calories'.

-note the use of 'extra column' with rating stars.
Code: Select all
Caption: Calorias *** Porções
type: script
script:
$a = readfile("<cc_item>");
$b = gettoken("$a", 1, "<crlf>") . "*** " . gettoken("$a", 5, "<crlf>");
return "$b";
format: text
item type: files
filter: txt
___________
To get the fine line underlining your active file: 'tools > customize list > highlight selected rows'; you may then want to customize it under 'tools > configuration... > colors > list > selected rows', also (un)ticking 'underline selected rows' at 'tools > configuration... > styles'.
Re: How are you using Custom Columns?
Posted: 23 Mar 2014 09:01
by admin
Great, alignment fix is coming...
Re: How are you using Custom Columns?
Posted: 24 Mar 2014 10:46
by autocart
Re: How are you using Custom Columns?
Posted: 03 Apr 2014 12:06
by admin
This column script returns 1 for all files where modified and created date are the same:
Code: Select all
Snip: CustomColumn 1
XYplorer 13.90.0004, 03.04.2014 12:02:08
Action
ConfigureColumn
Caption
Mod=Create
Type
3
Definition
$mod = property("#3", <cc_item>);
$create = property("#4", <cc_item>);
if ($mod == $create) {
return 1;
}
Format
0
Item Type
0
Item Filter
To find all files where modified and created date are the same you simply add this column to the current list, and the run this name search:
You cannot do this with the normal Find Files interface.
Re: How are you using Custom Columns?
Posted: 03 Apr 2014 12:33
by Marco
Thank you Don, very helpful!
I used a script that scanned sequentially all the items in the List to find out those whose three timestamps are different. This approach is conceptually almost identical but more user friendly.