Formula For Importing batch not working

Hi Everyone,
I tried using the shell-execute function to run a batch that imports an .csv. The batch itself runs perfectly fine.
But the AFL-Script when backtested comes up with the error "the batch file specified in the command line does not exist"

This is the code
ShellExecute("runbatch", "C:\Program Files\AmiBroker\BATCH\", "" );



Also if i wanted to automate this import lets say every 5 minutes, would i just use the analysis auto repeat function. Or would i have to use an afl automation script.


ShellExecute("runbatch", "C:\\Program Files\\AmiBroker\\BATCH\\", "" );

I am trying to do batch run from afl but not successful till now. I tried both the methods suggested here but none are working.

You should share more details, even a simple thing like windows permissions can prevent it from running.

Share AB verson, install path etc, did you try running similar code from a windows batch?

ShellExecute("batchrun","C:\\Program Files (x86)\\AmiBroker\\Formulas\\Custom\\","");  

this is the code i'm trying. In the batch file i have an ascii import and save database actions, but when i run the afl using backtest/scan ascii import doesn't happen
AB version 6.2, and i tried to run this from windows batch then it works


"runbatch" NOT "batchrun" as the first parameter, as per @awilson example.

ShellExecute("runbatch","C:\\Program Files (x86)\\AmiBroker\\Formulas\\Custom\\","");

thank you @beppe for pointing out the mistake.
thank you all for the help

1 Like