prefix_file: Add a prefix to a file name.

Description Usage Arguments Value Examples

View source: R/prefix_file.R

Description

Add a prefix to a file name.

Usage

1
prefix_file(from, to = NULL, prefix)

Arguments

from

Path where the files live.

to

Optional. Path where the files will be copied to. If NULL (default) files will be renamed in the directory from.

prefix

A string. Prefix to add to the file names.

Value

The files with a prefix added to their names.

Examples

1
2
3
4
5
6
prefix_file(from = "./file-from/", prefix = "my_prefix")
prefix_file(
  from = "./file-from/",
  to = "./file-to",
  prefix = "my_prefix"
)

maurolepore/handy documentation built on May 21, 2019, 1:37 p.m.