renameNow: Append date-time to file string

Description Usage Arguments Details See Also Examples

View source: R/renameNow.R

Description

Add the date/time to a character string right before the file extension. Useful for adding the date to a default file name.

Usage

1

Arguments

x

one or more character strings ending with an extension (see Details for definition of extension)

Details

The file extension is defined by the regular expression pattern "(\.[^.]+$)". I.e., the extension is defined as the final period and the character(s) that follow it (not including end of string etc). Note that "test.csv .," will be recognized as havign an extension (".,"), whereas "test.csv ." will return an error.

See Also

See rbLib-package for package overview.

Examples

1
renameNow(c("test1.csv","test2.txt"))

rBatt/rbLib documentation built on May 26, 2019, 7:45 p.m.