Can not rename

24 views
Skip to first unread message

jai yangc

unread,
Jul 30, 2024, 12:50:51 PM7/30/24
to camtrapR
Hello all 

I need your help, when run the code for rename images. 
my code

raw_images <- file.path(getwd(), "raw_images")

images_renamed <- file.path(getwd(), "images_renamed")

 

if (Sys.which("exiftool") != ""){

renaming.table <- imageRename(inDir = raw_images,

outDir = images_renamed,

hasCameraFolders = TRUE,

keepCameraSubfolders = TRUE,

copyImages = TRUE,

writecsv = TRUE

)

}


So, I alway got the result as below. 
 
raw_images <- file.path(getwd(), "raw_images") > images_renamed <- file.path(getwd(), "images_renamed") > if (Sys.which("exiftool") != ""){ + renaming.table <- imageRename(inDir = raw_images, + outDir = images_tagged, + hasCameraFolders = TRUE, + keepCameraSubfolders = TRUE, + copyImages = TRUE, + writecsv = TRUE + ) + } > #Check if the images were renamed > list.files(images_renamed, recursive = TRUE) character(0)

Any one can suggest me? thank you in advance for your help.

Jürgen Niedballa

unread,
Aug 11, 2024, 5:21:15 AM8/11/24
to jai yangc, camtrapR
Hi, 
- do the examples from ?imageRename or the vignette work?
- better don't use getwd(). Better to explicitly define the full paths
- could there be confusion between images_tagged and images_renamed? That seems likely based on the code you shared 

Best,
J




--
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 on the web, visit https://groups.google.com/d/msgid/camtrapr/de643b9e-bd1d-4ce9-8ecf-6e26c565cc9bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages