fAddDate {quickcode}R Documentation

Append date to filename

Description

Add today's date to the filename

Usage

fAddDate(..., format = "%d-%b-%Y")

Arguments

...

file name or path to concat

format

time format e.g. %d-%b-%Y , refer to date3to1 for date formats

Details

The present function enables users to add the current date to the file name, facilitating the straightforward saving of files with their respective dates. It accepts different file paths and names as arguments, as demonstrated in the example section. This functionality simplifies the process of associating a file's creation date with its name, aiding users in recalling when a file was saved. Moreover, it serves as a preventive measure against unintentional overwriting of files created on different dates.

Value

file name with the current date added as suffix

Examples


# Task 1
fAddDate("path1/","path2/filepre","filemid","fileend.png")

# Task 2
fAddDate(c("path1/","path2/"),"filepre","filemid","fileend.png")

# Task 3
fAddDate("one_file_name_fileend.pdf")

# Task 4
fAddDate(c("path1/","path2/"),"filepre","filemid",c("fileend.png",".pdf"))



[Package quickcode version 0.8 Index]