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: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

How are you using Custom Columns?

Post by admin » 22 Mar 2014 21:18

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 1208 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...
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

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

Re: How are you using Custom Columns?

Post by SkyFrontier » 22 Mar 2014 23:13

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 1154 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: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: How are you using Custom Columns?

Post by admin » 23 Mar 2014 09:01

Great, alignment fix is coming...
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷


admin
Site Admin
Posts: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: How are you using Custom Columns?

Post by admin » 03 Apr 2014 12:06

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.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

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

Re: How are you using Custom Columns?

Post by Marco » 03 Apr 2014 12:33

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