Copy folder recursive in R

后端 未结 6 845
谎友^
谎友^ 2021-02-13 17:27

Am I missing something in the functions?
I want to copy a folder with some files and another subfolder from one location to another. I tried to use file.copy(from, to,

6条回答
  •  暖寄归人
    2021-02-13 18:23

    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.

提交回复
热议问题