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

ebat79

  • Newbie
  • *
  • Posts: 2
    • View Profile
I want to: "Execute a .BAT file for the selected files with some argument".
Here is the script i made:
Code: newbielink:javascript:void(0); [nonactive]
@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: newbielink:javascript:void(0); [nonactive]
MC.run CMD="COMP-ACU2.bat" ARG="{$item} DEBUG" SHELL
Result in an error:
Code: newbielink:javascript:void(0); [nonactive]
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 »