### "trial" run. create a table with file names after renaming, but don't copy images.
# first, find sample image directory in package directory:
wd_images_raw <- system.file("pictures/raw_images", package = "camtrapR")
if (Sys.which("exiftool") != ""){ # only run this example if ExifTool is available
# because copyImages = FALSE, outDir does not need to be defined
renaming.table <- imageRename(inDir = wd_images_raw,
hasCameraFolders = FALSE,
copyImages = FALSE,
writecsv = FALSE
)
} else {
message("ExifTool is not available. Cannot test function")
}
## Not run:
#
# # define image directories
#
# # raw image location
# wd_images_raw <- system.file("pictures/raw_images", package = "camtrapR")
# # destination for renamed images
# wd_images_raw_renamed <- file.path(tempdir(), "raw_images_renamed")
#
#
# if (Sys.which("exiftool") != ""){ # only run this example if ExifTool is available
#
# # now we have to set outDir because copyImages = TRUE
# renaming.table2 <- imageRename(inDir = wd_images_raw,
# outDir = wd_images_raw_renamed,
# hasCameraFolders = FALSE,
# copyImages = TRUE,
# writecsv = FALSE
# )
# }
#
# list.files(wd_images_raw_renamed, recursive = TRUE)
#
# ## End(Not run)
Run the code above in your browser using DataLab