Macro

The macro command runs a series of commands that you specify in a macro file.

By including the macro command within a macro file, you can nest as many as 10 levels of commands.

Comment lines are not supported within the macro file that you specify for the macro command.

Windows operating systemsLinux operating systemsOracle Solaris operating
systemsAIX operating systemsMac OS X operating
systems

Supported Clients

This command is valid for all clients.

Syntax

Read syntax diagramSkip visual syntax diagramMAcro  macroname

Parameters

macroname
Specifies the fully qualified name of the file that contains the commands.

Examples

The following is an example of how to use the macro command.

Task
Selectively back up files in the following directories:
  • Windows operating systemsc:\devel\project\proja
  • Windows operating systemsc:\devel\project\projb
  • Windows operating systemsc:\devel\project\projc
  • Linux operating systemsOracle Solaris operating
systemsAIX operating systemsMac OS X operating
systems/devel/project/proja
  • Linux operating systemsOracle Solaris operating
systemsAIX operating systemsMac OS X operating
systems/devel/project/projb
  • Linux operating systemsOracle Solaris operating
systemsAIX operating systemsMac OS X operating
systems/devel/project/projc

Windows operating systemsLinux operating systemsOracle Solaris operating
systemsAIX operating systemsMac OS X operating
systemsCommand: macro backabc.mac

Where backabc.mac contains the following statements: Linux operating systemsOracle Solaris operating
systemsAIX operating systemsMac OS X operating
systems
 Selective /devel/project/proja/
 Selective /devel/project/projb/
 Selective /devel/project/projc/
Windows operating systems
 selective c:\devel\project\proja\*.*
 selective c:\devel\project\projb\*.*
 selective c:\devel\project\projc\*.*