How does one directly access the value of a column for a folder or file via script?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Dustydog
Posts: 321
Joined: 13 Jun 2016 04:19

How does one directly access the value of a column for a folder or file via script?

Post by Dustydog »

I'm sure this is somewhere obvious, but I'm having trouble finding it; for example: The column with the cached folder size, already-calculated hash value of a file, or a script-calculated column?

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: How does one directly access the value of a column for a folder or file via script?

Post by bdeshi »

Code: Select all

  $column_index = 5;  // index of column info you want to get
  $selected_row = report(, 1);  // returns selected item's entire row data as displayed on current list, tab-separated
  text gettoken($selected_row, $column_index, <tab>);  // extract column from tab-separated row data and display
My column layout at this moment was Index, Name, FilteredName ( a custom column), Ext, Size, ... . So I used $column_index = 5 to get the Size cell's text for the selected item.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply