copyFiles {PBSadmb}R Documentation

Copy System Files

Description

Copy files with specified prefixes and suffixes from one location to another.

Usage

copyFiles(prefix, suffix=NULL, srcdir=getwd(), dstdir=getwd(), ask=TRUE)

Arguments

prefix

string scalar/vector of potential file prefixes.

suffix

string scalar/vector of potential file suffixes.

srcdir

source directory from which to copy files.

dstdir

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.

Details

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.

Value

Invisibly returns a Boolean vector with names of files that have been copied or not.

Author(s)

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

See Also

editAD


[Package PBSadmb version 1.1.6 Index]