Batch file generation