I've been having trouble using the imageRename function, every time I run it I end up with the error:cannot find Exiftool. My files are being ran through a external hard drive, and the exiftool is on my C drive in my desktop. From the first couple of functions, it looks like R is able to find the exiftool so I am not quite sure what the problem is.
Here is the code that I currently have in Rstudio:
rm(list = ls())
library(camtrapR)
#make R find exiftool
exiftool_dir<-"C:/Windows/Exiftool/exiftool.exe"
exiftoolPath(exiftoolDir = exiftool_dir)
#check to make sure it has been added to PATH
grepl(exiftool_dir, Sys.getenv("PATH"))
#Loads my Camera Trap Trial Data
TrialData <- read.csv("Camera Trap Trial Run.csv")
#station: a station is a locality containing one or more camera traps (often a pair of two)
#camera trap: refers to the individual camera unit. One or more (often two) constitute a station
#occasion: a distinct sampling event of 1 or more days
#effort: number of active trapping days per station and occasion
#Creates the folders and the directory for the images
wd_createStationDir <- file.path("F:\\Camera Trap Trial", "Raw_Images")
StationFolderCreate1 <- createStationFolders(inDir = wd_createStationDir,
stations = as.character(TrialData$Station),
createinDir = TRUE)
StationFolderCreate1
#destination for renamed images to be copied to
wd_images_ID <- "F:\\Camera Trap Trial/Raw Images"
wd_images_raw_renamed <- file.path("F:\\Camera Trap Trial", "Renamed Images"
renamed <- imageRename(inDir = wd_createStationDir,
outDir = wd_images_raw_renamed,
hasCameraFolders = TRUE,
keepCameraSubfolders = TRUE,
copyImages = FALSE,
writecsv = TRUE)