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.

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systems

Supported Clients

This command is valid for all clients.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-MAcro-- --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
  • AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systems/devel/project/proja
  • AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systems/devel/project/projb
  • AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systems/devel/project/projc

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systemsCommand: macro backabc.mac

Where backabc.mac contains the following statements: AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris 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\*.*