Rename key Stock Synthesis output files by adding integer value
Source:R/file_increment.R
file_increment.Rd
Rename files found with pattern
by adding i
to their
name before the extension.
Usage
file_increment(
path,
i,
verbose = FALSE,
pattern = "^[CcPRw][a-zA-Z]+\\.sso|summary\\.sso|\\.par$"
)
Arguments
- path
Directory where model files are located.
- i
An integer value to append to the file name before the
.sso
extension.- verbose
A logical value specifying if output should be printed to the screen.
- pattern
A character value specifying the file names to search for in
getwd()
.
Value
Invisibly returns a vector of logical values specifying whether or not the file was successfully renamed.
Details
The .par
file, which is the only file extension searched for
with the default entry that does not end in .sso
, is
modified differently._i.sso
is added to the file name.