Author Topic: send selected files to a program in the 'send to' list  (Read 8693 times)

Jean

  • Contributor
  • Active Member
  • *****
  • Posts: 99
    • View Profile
send selected files to a program in the 'send to' list
« on: March 08, 2020, 12:13:03 »
Back at multicommander after a trial of directory opus. Glad to be back, i prefer MC, not only money wise.

Is it possible to send selected files to a program in the 'send to' list by a script?
Another solution for me would be the ability to assign a key to that specific program in the 'send to' list.
The whole idea is that i'd like to send selected files to a utility with just one keystroke.

Jean

  • Contributor
  • Active Member
  • *****
  • Posts: 99
    • View Profile
Re: send selected files to a program in the 'send to' list
« Reply #1 on: March 08, 2020, 13:33:54 »
If someone is looking for a way to do this, this works for me.

Code: [Select]
@var $files = GetSelectedPaths(), $n;
@var $s = "";
for( $n=0; $n<arrayCount($files); $n++ )
  {
  $s = $s + "\"" + $files[$n] + "\" ";
  }
$s = "c:\myprog.exe " + $s;
MC.Run CMD={$s}
« Last Edit: March 08, 2020, 14:41:06 by Jean »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: send selected files to a program in the 'send to' list
« Reply #2 on: March 09, 2020, 09:22:08 »
or

Code: [Select]
@var $selectedItems = GetSelectedPaths();
@var $selected = ArrayToString( $selectedItems , "  ", 1 ); // space separated list with all selected items

@var $cmd = "c:\myprog.exe " + $selected;
MC.Run CMD={$cmd}

Jean

  • Contributor
  • Active Member
  • *****
  • Posts: 99
    • View Profile
Re: send selected files to a program in the 'send to' list
« Reply #3 on: March 09, 2020, 13:04:46 »
great, thank you.