code: public void runBatchFile(File batchFile) throws IOException {
  		final BufferedReader reader = new BufferedReader(new FileReader(batchFile));
  		try {
  			doLines(0, new LineReader() {
  				@Override
  				public String getNextLine(String prompt) throws IOException {
  					return reader.readLine();
  				}
  			}, true);
  		} finally {
  			reader.close();
  		}
  	}
docs: Read in commands from the batch-file and execute them.