Copy files with specified prefixes and suffixes from one location to another.
copyFiles(prefix, suffix=NULL, srcdir=getwd(), dstdir=getwd(), ask=TRUE)
Invisibly returns a Boolean vector with names of files that have been copied or not.
string scalar/vector of potential file prefixes.
string scalar/vector of potential file suffixes.
source directory from which to copy files.
destination directory to copy files to.
logical: if TRUE
, popup boxes will prompt the user
for every instance that a file will be overwritten.
Rowan Haigh, Program Head -- Offshore Rockfish
Pacific Biological Station (PBS), Fisheries & Oceans Canada (DFO), Nanaimo BC
locus opus: Offsite, Vancouver BC
Last modified Rd: 2011-02-14
This function uses R's list.files
and file.copy
functions.
The pattern recognition tends not to work when given the wildcard character
*
; however, the user may use this character, and the code will interpret it.
editAD