When running a targets workflow, I often have files that are generated automatically as part of the workflow. However, I often rename them to match the directory, and add the day to the filename. This enables that automatically.
Usage
ft_rename_outputs(
file_names = NULL,
prefix = "",
suffix = Sys.Date(),
overwrite = FALSE
)
Details
To rename actual targets, pass the output of tar_read(target_name)
. Note that
this function will not copy and rename qmd
and rmd
source files.
See also
Other File Manipulation:
ft_add_figure_numbers()
,
ft_zip_directory()