f_get_latest_file: Get latest file

View source: R/f - Get latest file.R

f_get_latest_fileR Documentation

Get latest file

Description

Get latest file with given c.file.string and of type c.file.type.

Usage

f_get_latest_file(
  c.file.string,
  c.file.type,
  c.path,
  b.exact.match = FALSE,
  c.file.string.exclude = NULL,
  c.sheet.name = NULL,
  c.show.report = "all"
)

Arguments

c.file.string

String to search for in the filename.

c.file.type

File type.

c.path

Path where the files should be searched for.

b.exact.match

Should the string match the files exactly? (default: FALSE)

c.file.string.exclude

String in files to exclude (default: NULL)

c.sheet.name

Sheetname, in case of Excel file. The first sheet will be chosen in case the value is NULL (default: NULL)

c.show.report

What feedback should we show? Options: 'none', 'minimal', 'all' (default: 'all')

Details

-

Value

Full path to latest file in concerned folder.

Author(s)

Pieter Overdevest

Examples

c.path.file <- f_get_latest_file(

       c.file.string         = "allocation",
       c.file.type           = "xls",
       c.path                = path.data,
       b.exact.match         = FALSE,
       c.file.string.exclude = NULL,
       c.sheet.name          = NULL,
       c.show.report         = "all"
)

pieterov/generaltoolbox documentation built on Jan. 25, 2025, 10:32 a.m.