Last chance! 50% off unlimited learning
Sale ends in
Move specified files into specified directories
move_files(files, destinations, overwrite = FALSE)file.move(files, destinations, overwrite = FALSE)
Invisibly, a logical vector with a TRUE
for each time the operation
succeeded and a FALSE
for every fail.
A character vector of files to move (relative or absolute paths).
A character vector of the destination directories into which to move the files.
Allow overwriting of files? Default no.
If there are
If you try to move files to a directory that doesn't exist, the directory is first created and then the files are put inside.
if (FALSE) {
dir.create("dir")
files <- c("1litres_1.txt", "1litres_30.txt", "3litres_5.txt")
file.create(files)
file.move(files, "dir")
}
Run the code above in your browser using DataLab