Command Reference Guide

3Com Router 5000 Family and Router 6000 Family execute 161
Command Reference
execute
Purpose Use the execute command to execute the specified batch file.
Syntax execute filename
Parameters filename
Name of a batch file (including the path) with a .bat
extension. Valid values are 1 to 256.
Example Execute the batch file “test.bat” in the flash:/ directory.
[3Com] execute test.bat
View This command can be used in the following views:
System view
Description Batch files are command line files. Executing a batch file is to execute a set of
command lines in the file. Command lines fall into two categories: configuration
command such as local-user, and operation command such as display
current-configuration. If all the commands in a batch file are configuration
commands, the file is called configuration file; if all the commands in the file are
operation commands, the file is called operation command file.
Executing a configuration file can fast add to the system new configurations or
modify the current configurations. When doing this, the system adds those new
configurations and rewrites the existing configurations that are different from the
configuration file, while leaving the existing configurations that are not involved
intact.
You can execute an operation command file to have the system execute one or
multiple operation commands automatically. For example, to view system operating
information, you need to execute the commands display version and
display current-configuration. To view routing information, you must
execute the display rout-static command in addition. You can however put
these three commands in a file, running.bat for example, and save the file to Flash.
After that, you can have the system execute execute running.bat each time you
want to execute these three commands.
You can put sets of commands that are always executed together in batch files. The
execute command allows you, especially as a service engineer, to execute a batch
file instead of entering each command in it individually.
Note that:
The extension of batch files must be .bat.
A valid batch file contains only standard command lines.