powered by
Adds a timestamp to a file
add_file_timestamp( x, ts = Sys.time(), format = "%Y-%m-%d %H%M%S", sep = " " )
The full name paths with the appended time stamp
A vector of files
A single timestamp or vector of timestamps (default: Sys.time())
Sys.time()
A format to be applied to the times; set to NULL to skip formatting
NULL
A character vector of length 1 to separate the timestamp from the file name
character
file1 <- tempfile(fileext = ".txt") file2 <- tempfile() add_file_timestamp(file1) add_file_timestamp(file2) file.remove(file1, file2)
Run the code above in your browser using DataLab