file.copy {file} | R Documentation |
in the natural order for copying. Copying to existing destination files is
skipped unless overwrite = TRUE. The to argument can specify a single existing
directory. If copy.mode = TRUE file read/write/execute permissions are copied
where possible, restricted by ‘umask’. (On Windows this applies only to files.
) Other security attributes such as ACLs are not copied. On a POSIX filesystem
the targets of symbolic links will be copied rather than the links themselves,
and hard links are copied separately. Using copy.date = TRUE may or may not
copy the timestamp exactly (for example, fractional seconds may be omitted),
but is more likely to do so as from R 3.4.0.
file.copy(from, to,
overwrite = FALSE,
verbose = FALSE);
These functions return a logical vector indicating which operation succeeded for each of the files attempted. Using a missing value for a file or path name will always be regarded as a failure.