Multi Commander Support Forum

Multi Commander => Script => Topic started by: ebat79 on November 28, 2019, 15:12:03

Title: Execute a .BAT file for the selected files with some argument
Post by: ebat79 on November 28, 2019, 15:12:03
I want to: "Execute a .BAT file for the selected files with some argument".
Here is the script i made:
@var $comp = "COMP-ACU2.bat";
@var $arr = GetSelectedFileNames();
@var $count = arrayCount($arr);
@var $n;
for( $n = 0; $n < $count; $n++ )
{
  @var $item;
  $item = PathGetNamePart( $arr[$n], 1 );
  MC.run CMD="COMP-ACU2.bat" ARG="{$item} DEBUG" SHELL;
}


But the line:
MC.run CMD="COMP-ACU2.bat" ARG="{$item} DEBUG" SHELL

Result in an error:
Script engine error - Line : 8, Error : -1 => Code : "MC.run CMD="COMP-ACU2.bat" ARG="{$item} DEBUG" SHELL"

Any ideas?