5-20 Syntax and Parameters
MX2 Reference Guide Revision A MX2A137REFGD
The XFER_ARGS Environment Variable
XFER recognizes the environment variable XFER_ARGS. This variable
can be used to set option settings that you want for most transfer
sessions. You can even specify files in the XFER_ARGS environment.
Parsing of the XFER command line starts with the XFER_ARGS
variable and then continues through any other specified options or
filenames.
You can use a single slash or hyphen to merge multiple options in the
XFER_ARGS variable, or you can use a slash or hyphen for each option.
The following example illustrates both cases:
C:\> set XFER_ARGS = /ZROB57600
C:\> set XFER_ARGS = /Z /R /O /B57600
For each command line in the example, files will be received (option R)
using Zmodem protocol (Z) and a baud rate (B) of 57600 baud, and
existing files will always be overwritten (O).
Note: You can use up to ten slashes or hyphens for options in the
environment variable. See the following section, “Multiple-
Option Blocks” for more details.
Any of the parameters used in the example could be overwritten on the
command line. For example, if you issued the following command:
C:\> xfer /x myfile
XFER would use Xmodem for the file transfer instead of Zmodem,
while still using the other option settings specified in the XFER_ ARGS
variable.
There are two precautions for mixing options in the environment
variable with options on the command line. The first is about options
that are supported by Zmodem protocol only. In the following example:
C:\> set XFER_ARGS = /z /w4096 /c3
C:\> xfer /x myfile
the environment variable is set up to use Zmodem with a 4K window and
crash recovery turned on. In the XFER command line, Xmodem protocol
is specified. Since Xmodem doesn’t support windows or crash recovery,
both those options are ignored. Another, more troublesome scenario is
the following:
C:\> set XFER_ARGS = /z /o5
C:\> xfer /x myfile
Here, XFER is set to Zmodem in the environment variable, with an
overwrite setting of 5 (overwrite if source is newer). However, in the
XFER command line, Xmodem protocol is specified. The only overwrite