ShellExecute within exploration

Hi TJ & Afl master ,

i written a script to run windows command in afl , the problem is ,the shellexecute (Z variable) keeping running while the exploration run. its took the process of exploration become a very slow. How to make the shellexecute should be run after the addcolumn has done the exploration first or any other idea?

AddColumn(Close,"Close",1.0);
Z=ShellExecute("cmd.exe","/c rename C:\Data\AAA.TXT ABC.TXT","",0);
Filter=1;

thanks in advance ...
Dev

You can't. AmiBroker is multithreaded program and many things are happening in parallel. ShellExecute is asynchronous.

You should be using BATCH instead
http://www.amibroker.com/guide/h_batch.html - this one allows "waiting" for Analysis to complete.