Hi Tim, This is what i usually try and do (see ?file.copy) ## R Start... > src.dir <- '\\\\PFO-SBS001\\Redirected\\tonyb\\Desktop\\folderA\\' > dest.dir <- '\\\\PFO-SBS001\\Redirected\\tonyb\\Desktop\\folderB\\' > > file.names <- dir(src.dir) > sapply(file.names, function(x) { + file.copy(from=paste(src.dir, x, sep=''), + to=paste(dest.dir, x, sep=''), + overwrite = FALSE) }) example.txt TRUE > ## R end.
Hope that helps a like, Tony On 13 Feb, 12:42, Tim Smith <tim_smith_...@yahoo.com> wrote: > Hi, > > I was trying to copy a directory from one location to another. Is there a > command to do this (similar to the file.copy command)? > > thanks! > > [[alternative HTML version deleted]] > > ______________________________________________ > r-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list 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.