copyFiles {PBSadmb} | R Documentation |
Copy files with specified prefixes and suffixes from one location to another.
copyFiles(prefix, suffix=NULL, dir0=getwd(), dir1=getwd(), ask=TRUE)
prefix |
string scalar/vector of potential file prefixes. |
suffix |
string scalar/vector of potential file suffixes. |
dir0 |
source directory from which to copy files. |
dir1 |
destination directory to copy files to. |
ask |
logical: if TRUE , popup boxes will prompt the user
for every instance that a file will be overwritten. |
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.
Invisibly returns a Boolean vector with names of files that have been copied or not.
Rowan Haigh, Pacific Biological Station, Nanaimo, BC