26
Support and Feedback / Re: Go to first file
« on: October 11, 2023, 20:27:15 »
You may create user defined command of type "Multi-Script" and bind it a to a shortcut or/and put it to the quicklaunch bar or button bar.
I'm not sure about performance in case of too many files/folders. Also I haven't tested it with different sorting styles.
Code: [Select]
@var $src_path = GetSourcePath();
@var $names = GetSourceItems();
@var $count = arrayCount( $names );
@var $i;
for( $i = 0; $i < $count; $i++ )
{
@var $file = $src_path ^ $names[ $i ];
@var $result = FileExists( $file );
if ( 1 == $result )
{
MC.Explorer.SetItemFocus ITEM="{$names[ $i ]}"
break;
}
}
I'm not sure about performance in case of too many files/folders. Also I haven't tested it with different sorting styles.