On 08/05/2017 6:59 AM, Archit Soni wrote:
Hey Ben,

I tried this,

# identify the folders
current.folder <- "C:/Where my files currently live"
new.folder <- "H:/Where I want my files to be copied to"

# find the files that you want
list.of.files <- list.files(current.folder, "SDM\\.tif$",full.names=T)

# copy the files to the new folder
file.copy(list.of.files, new.folder)

But i am still getting FALSE and files are not getting copied from the
folder. However,if I give a single file name it copies that file to new
folder.

Any thoughts ?

Getting FALSE where?

Does list.of.files look right?

If it contains any directories, you'll want "recursive = TRUE" in file.copy().

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to