Author Topic: Execute a .BAT file for the selected files with some argument  (Read 123 times)

ebat79

  • Newbie
  • *
  • Posts: 1
    • View Profile
I want to: "Execute a .BAT file for the selected files with some argument".
Here is the script i made:
Code: [Select]
@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:
Code: [Select]
MC.run CMD="COMP-ACU2.bat" ARG="{$item} DEBUG" SHELL
Result in an error:
Code: [Select]
Script engine error - Line : 8, Error : -1 => Code : "MC.run CMD="COMP-ACU2.bat" ARG="{$item} DEBUG" SHELL"
Any ideas?
« Last Edit: November 29, 2019, 10:05:33 by ebat79 »