How are you using Custom Columns?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
admin
Site Admin
Posts: 65017
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

How are you using Custom Columns?

Post by admin »

Here's something that might be useful one day. A column to sort names by the last name:
LastName.png
LastName.png (26.86 KiB) Viewed 2758 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...

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: How are you using Custom Columns?

Post 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'. :biggrin:
-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'.
Attachments
XY_CookingRecipes_New.PNG
XY_CookingRecipes_New.PNG (22.18 KiB) Viewed 2704 times
Last edited by SkyFrontier on 23 Mar 2014 13:21, edited 2 times in total.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

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

Re: How are you using Custom Columns?

Post by admin »

Great, alignment fix is coming...


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

Re: How are you using Custom Columns?

Post 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:

Code: Select all

Mod=Create:1
You cannot do this with the normal Find Files interface.

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: How are you using Custom Columns?

Post by Marco »

Thank you Don, very helpful! :appl:
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.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Post Reply