e.g. DECLARE INTEGER ShellExecute IN shell32.dll ; INTEGER lhndWin, ; STRING lcAction, ; STRING lcFileName, ; STRING lcParams, ; STRING lcDir, ; INTEGER lnShowWin lcAction = "open" Select (MyAlias) Scan lcFileName = MyAlias.FileName && "c:\MyBatchFile.bat" If ShellExecute(0, cAction, cFileName, "", "", 2) > 32 then *-- Success Else *-- Error Endif *-- Want to wait till the above ShellExecute() function *-- finishes and only then process the next record. EndscanThanks.