R/pdf_copy2root.R

Defines functions pdf_copy2root

Documented in pdf_copy2root

#' Copy pdf files from subdirectories to root dir
#'
#' @param path Character. Specify root directory.
#'
#' @export
pdf_copy2root <- function(path) {
  #path <- "~/Downloads/top-articles"
  pdf <- list.files(path, pattern = ".pdf$", recursive = TRUE, full.names = TRUE)
  file.copy(pdf, file.path(path, basename(pdf)))
}
sachserf/sf documentation built on June 8, 2024, 4:23 p.m.