Page 1 of 1

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

Posted: 26 Nov 2017 23:37
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?

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

Posted: 27 Nov 2017 09:44
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.