Learn R Programming

icesTAF (version 1.3-2)

cp: Copy Files

Description

Copy files, overwriting existing files if necessary, and returning the result invisibly.

Usage

cp(from, to)

Arguments

from

source file names. Multiple filenames can be matched using wildcard notation, such as *.csv to copy all CSV files.

to

destination file names, or directory.

Value

TRUE for success, FALSE for failure, invisibly.

See Also

file.copy is the base function to copy files.

icesTAF-package gives an overview of the package.

Examples

Run this code
# NOT RUN {
write(pi, "A.txt")
cp("A.txt", "B.txt")
file.remove("A.txt", "B.txt")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab