Copy folder recursive in R
I think R.utils::copyDirectory(oldDir, newDir)
is the solution to what you're asking. It doesn't require creating newDir
first, either.
Ok, I just figured out what the error means... :-) I have to create the new directory in advance and now I can copy everything...
dir.create('new_folder')
file.copy("my_folder", "new_folder", recursive=TRUE)
This works as expected.