Using Qedit in Batch

Qedit in batch is almost identical to Qedit in a session, except for answering questions. When Qedit asks a question in batch, no one is there to answer it. Therefore, Qedit does not expect an answer from $stdinx. Qedit assumes that you want your batch task to complete, so it always selects the option that will complete the command successfully. This is normally a “YES” answer, as in “yes, clear the file” or “yes, upshift the line”. Qedit prints the question on $stdlist, and the answer that it has selected for you.

If you run Qedit from a batch job, but redirect $stdinx and $stdlist to the same terminal, Qedit acts as if it were in Session.

If you run Qedit in a REMOTE SESSION that was created from a batch job on the other machine, Qedit is unable to detect that it is really controlled by a job. So, Qedit operates in Session mode and waits for answers to all questions. You can use Set Interactive Off as your first command to override this.

When Qedit encounters an error in batch, it has no one there to correct it. Therefore, Qedit normally aborts. However, you can use Set Autocont On to override this abort, instructing Qedit to keep processing after errors in batch (i.e., automatically insert a :Continue before each command).

Using Qedit in Batch