jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
376 stars 59 forks source link

delete a file #150

Closed rawexp closed 1 year ago

rawexp commented 1 year ago

I have my camera set to record RAW + JPG. I would like to retrieve the JPG and then delete it from the SD card.

I can achieve this through gphoto2 using a command such as: "gphoto2 -d /store_00020001/DCIM/100EOS1D/VQ4A4383.JPG"

Is there an equivalent function here? For example, something that would work like: gp.gp_file_delete('/store_00020001/DCIM/100EOS1D/VQ4A4383.JPG')

jim-easterbrook commented 1 year ago

The function's called gp_camera_file_delete, as documented here: http://www.gphoto.org/doc/api/gphoto2-camera_8h.html

The clear-space.py example shows its use.

rawexp commented 1 year ago

wonderful, thanks for the quick response