Purpose
Copy files and directories.
Synopsis
procedure cp(a_args:...)
Argument
|
a_args
|
Files and directories to copy, the last element of the list is the destination file or directory.
|
Example
Further information
1. The first argument of the routine is interpreted as a list of flags if it starts with a '-'.
2. If the last argument (the destination file) does not exist but ends with a
"/", it will be interpreted as a directory name that will be created before starting the copy.
3. The copy will be performed if
runmode is not
"clean" and any of the source files is newer than the destination file or if the flag
"-f" is used.
4. The destination files will be deleted if
runmode is
"clean" unless the flag
"-f" is used.
5. With the flag
"-t" files are open in text mode (instead of binary mode).
6. With the flag
"-r" directories are copied recursively, otherwise directories are silently ignored.
7. When copying files with
cp, the copies receive the same dates as the original files.
8. In the list of source files the directory separator
// may be used instead of a single
/ symbol: this indicates the location of the directories to copy. For instance with the path
"A/B//C/D" the entire path
"C/D" (and subdirecories of
"D") will be transferred to the destination directory. However using
"A/B/C/D" will copy only the content of
"D" (and its subdirectories).
9. Execution of the program terminates if the operation fails and
exitonfail is
true unless flag
"-i" is used.
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the
property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not
convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except
solely for internal evaluation purposes to determine whether to purchase a license to the software
described in this documentation, or as otherwise set forth in a written software license agreement
between you and FICO (or a FICO affiliate). Use of this documentation and the software described in
it must conform strictly to the foregoing permitted uses, and no other use is permitted.