Re: Last Pictures ID, how to retrieve it?
Frédéric Leunen <[email protected]>
| Newsgroups | gmane.comp.multimedia.gphoto.user |
|---|---|
| Message-ID | <[email protected]> |
Note I'm not a developer and not a Linux specialist. This is the reason why I am asking your help.
Here are the two commands I use for the task explained in previous email:
# get the picture number
lastId=`gphoto2 --list-files | tail -2 | awk '{print substr($1, 2)}' | head -n 1`
# ... A few code lines to check and log the value of lastId
# download the file
gphoto2 --get-file $lastId --force-overwrite
Do you know a more efficient alternative skipping the long, very long, file list creation...?
Thank you.
Best regards,
Fred
Le 16 mars 2017 9:00 PM, Frédéric Leunen <[email protected]> a écrit :
Hi all,
I would like to know how can I easily catch the identifier (the picture number) of the last picture present on the memory card of the camera.
I do it actually using the "gphoto2 --list-files" command and capture the last ID communicated. But it is really long or completely unresponsive when more than 15000 pictures are stored on memory card.
I didn't see how can I do it easily.
Cameras used : Canon 100D and an old 400D.
The final goal of this is to download only the last picture and do a sort of supervision using the ID to count the number of pictures taken for example each day. I am doing really long timelapse...
Thank you in advance for your help.
Br,
Fred
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gphoto-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gphoto-user