Copies the specified files between volumes.
Format
COPY source-path-name target-path-name
1 – Parameter
source-path-name
The name of the file that will be copied.
target-path-name
The name of the new file that will be created.
2 – Description
The COPY command transfers files from the OpenVMS volume to the
FAT volume, or from the FAT volume to the OpenVMS volume.
When executing a group of commands as part of a command
procedure, the /ERROR quaifier makes it possible to detect the
failure to copy a file by terminating EFI$CP execution with
a valid status and with DCL symbols containing the source and
target filenames.
No file format or record conversions are performed.
Wildcards are not permitted.
EFI$CP supports binary files (generally fixed length 512-byte
records) and stream files. It does block binary transfers for
all file types and does not do record IO. It preserves the end-
of-file markers when possible. In general, files types created
by FTP from a UNIX or DOS/Windows system to VMS are the types
suitable for EFI$CP. OpenVMS executables and binary firmware
files work as expected.
When transfering from FAT to RMS the default file format will
be fixed length 512-byte records. Use the /ASCII command to
set the attributes to STREAM_LF and the /TEXT command to set
the attributes to STREAM. The switches are not useful when
transfering from RMS to a FAT volume.
There are basic checks for the the file organization made when
copying files from OpenVMS onto the FAT volume, and files that
are likely incompatible with typical FAT tools can trigger an
INCOMPATFAT error such as the following:
copy sys$login:login.com bar:\efi\
%EFI-W-INCOMPATFAT, record organization or file structure not supported by FAT
Incompatible files will still be copied, however applications
reading the files will have no means of knowing how to treat the
contents. When copied back out to an RMS file they will not have
the correct file or record attributes and may also be unusable.
The most frequent error of this type is copying an OpenVMS text
file with the standard variable length records. Use the OpenVMS
CONVERT command to convert the files before using EFI$CP.
3 – Qualifiers
3.1 /BINARY
/BINARY (default)
Transfers the file from FAT to RMS in BINARY mode. The output
will be fixed length 512-byte records.
3.2 /ASCII
Transfers the file from FAT to RMS in STREAM_LF mode. The output
will be STREAM_LF.
3.3 /TEXT
Transfers the file from FAT to RMS in STREAM mode. The output
will be STREAM.
3.4 /LOG
/LOG
/NOLOG (default)
Controls whether log messages are displayed as the file is
copied.
3.5 /ERROR
/ERROR=EXIT
/ERROR=CONTINUE (default)
Determines if EFI$CP will continue processing or exit when an
error occurs in during the copy. The default is to continue
execution.
When executing a set of commands from a procedure, it can be
useful to exit EFI$CP when an error occurs. The /ERROR=EXIT
qualifier will cause this to happen.
In addition, two global DCL symbols will be created (if not
already existant) that will contain the source and target
filenames that failed:
EFICP$COPY_SOURCE will contain the name of the input file
EFICP$COPY_TARGET will contain the name of the output file
3.6 /REPLACE
/REPLACE
/NOREPLACE (default)
Controls whether an existing FAT file is deleted before the new
file is copied to the target FAT directory.
EFI$CP> COPY SYS$UPDATE:VMS_LOADER.EFI EFI:\EFI\VMS\VMS_LOADER.EFI
EFI$CP> COPY/ASCII EFI:\STREAM_LF_FILE.TXT SYS$LOGIN:FOO.TXT
EFI$CP> COPY SYS$SCRATCH:VMSFILE.COM FOO:\EFI\
%EFI-W-INCOMPATFAT, record organization or file structure not supported by FAT
EFI$CP>
EFI$CP> copy/error=exit xxx.dat efi:\efi
%EFI-E-NOTFOUND, specified file or directory was not found
$