ImageRename problems

4 views
Skip to first unread message

Cheryl Lohr

unread,
May 20, 2026, 2:30:35 AM (3 days ago) May 20
to camtrapR
Dear Juergen,
I hope you can help me. I've recently been convinced to start using camtrapR to process our hundreds of thousands of images. Since I work with a lot of lesser educated people it is imperative that I be able to rename images by site and date before they are sorted into species specific folders.

The imageRename function is giving me this error
Error in FUN(X[[i]], ...) : invalid 'type' (list) of argument

I have successfully used camtrapR to create my image directory and the Exiftool to fixDateTimeOriginal. The photos are from Reconyx cameras.

I have checked both R and RStudio are up to date and all packages are updated.

I would really appreciate your help.

Here is my script
#Set working directory
dir = "C:/Users/.../Animal Science Program - Lh compound cameras" #Truncated for confidentiality

setwd(dir)

#Activate ExifTool
exiftool_dir <- dir
addToPath(exiftool_dir)
# check if it has been added to PATH
grepl(exiftool_dir,  Sys.getenv("PATH"))

#Renaming images
# raw image location
images_raw <- file.path(dir, "Images")
# Construct the destination for renamed images to be copied to
images_renamed <- file.path(dir, "Images_renamed")

renaming.table2 <- imageRename(inDir=images_raw,
                               outDir=images_renamed,
                               hasCameraFolders=FALSE,
                               copyImages=TRUE)

Thanks,
Cheryl

Jürgen Niedballa

unread,
May 22, 2026, 6:56:19 AM (19 hours ago) May 22
to Cheryl Lohr, camtrapR
Hello, 
This is unexpected. What's the directory structure in your raw image directory?
Can you please share the output of:

list.dirs(images_raw)

To show the directory structure 

Jürgen 


--
You received this message because you are subscribed to the Google Groups "camtrapR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camtrapr+u...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/camtrapr/dc3b15eb-0a63-48c7-aae2-eaec45571f16n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages