I had idapython script for extracting some data from file. And a lot of files, where from needed to extract these data.
"C:\Program Files (x86)\IDA 6.8\idaw.exe" -Lfilename.log -A -S_try_script.py filename
it will open 'filename' in console ida and run script '_try_script.py'. In this script 'main' must be like that:
if __name__ == '__main__':
it waits to complete autoanalysis, executes script and exit. Ida console log will be in 'filename.log'.
So, you can use it from batch handling of the files.