Page 1 of 1
Custom column - count of times file opened?
Posted: 08 Nov 2017 05:13
by Zonko
I'd like to add an extra column that gives a count of the number of times I've opened / launched a file from XYPlorer. Similar to ITunes, where it shows the number of times a song has played, but instead tracks the time a file/video was opened.
Is this possible?
Of course, if the file is opened from vanilla explorer, no need to increment the count.
I see there is a built in column 'Date Accessed'. This would be a close second possibility, but I think this is a built in Windows and doesn't seem to work, anyway.
Re: Custom column - count of times file opened?
Posted: 08 Nov 2017 08:34
by highend
E.g. use this as the first entry for the portable file associations
Code: Select all
*>::tagitems("ex1",tagitems("ex1",,<curitem>)+1,<curitem>);#485;#1053;
And this as the script for the custom column
Code: Select all
return tagitems("ex1", , <cc_item>);
If the list refresh is too much for you, remove the #485;
part but the counter would be one behind and to see
the correct value you'd need to refresh the list manually...
Re: Custom column - count of times file opened?
Posted: 08 Nov 2017 15:53
by Zonko
It worked! Many thanks.
I took out the #485 - it added latency when opening a file, I can live with the counts being delayed.
Re: Custom column - count of times file opened?
Posted: 21 Dec 2017 03:57
by Zonko
One issue here - I've noticed this works if you open an item by double clicking, but if you use the context-menu (example : right-click-->Open with) it won't count. Imagine the portable file association is bypassed entirely in this case.
Also curious - what does the #1053 signify? I can't figure this out in the help files.
Re: Custom column - count of times file opened?
Posted: 21 Dec 2017 07:49
by jupe
Yes opening through the context menu opens via the shell directly bypassing portable file associations
#1053 is a command id,
#1053 Miscellaneous | File Operations | Open Selected Item(s) with OS Default (Ctrl+Shift+Enter)
you can look up the command IDs under the Help Menu | List all Commands, or alternatively make them always visible with Help | Command IDs on Menus, all these numbers can be used in scripts directly.