How to execute multiple commands through a text file with a Domino server

Technote (FAQ)

Question

Is it possible to execute scripts or a list of commands through a text file on a Domino server?

Answer

You can create a text file that lists the commands you would like to execute on the Domino server. The commands which you can include can be anything that can be typed at the server's console. To load the script you must use the < command (less-than symbol), followed by a blank space, and then the name of the text file you created. For example, if you need to execute these commands:

SHOW USER

SHOW TASK

you can create a file called F:\MYFILE.TXT, and within this text file, enter the commands that are to be executed. After you save the .TXT file, enter the following at the Domino server console:

> < F:\MYFILE.TXT

If there is more than one command in the .TXT file, they will be executed in the order in which they appear in the .TXT file.

All commands in the .TXT file could be encapsulated with start consolelog in the first line and in the last line stop consolelog to write the output into the console.log file.

Note: "stop consolelog" will close any logging launched manually or by CONSOLE_LOG_ENABLED=1 in notes.ini.