Skip to contents

Restores original filenames by inverting an audit log produced by image_rename_ocr. If files were renamed, they are moved back to their original names. If files were copied, the copied instances are safely removed.

Usage

image_rename_undo(log = NULL, dir = ".", verbose = TRUE)

Arguments

log

An image_rename_ocr object returned by image_rename_ocr, or a character string specifying the path to a .pliman_rename_log_*.rds file. If NULL (default), searches for the most recent log file in dir.

dir

Character string. Path to search for audit log files when log = NULL. Default is ".".

verbose

Logical. Whether to show progress messages. Default is TRUE.

Value

A data.frame summarizing the inverted operations and their status.

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

if (FALSE) { # interactive()
  library(pliman)
  # Undo the most recent rename in the current folder:
  # image_rename_undo()
}