0

Having some problems simply trying to delete files using gphoto2 from an MTP-PTP device. I'm in Ubuntu-Mate.

http://gphoto.org/doc/manual/ref-gphoto2-cli.html

If I list files using gphoto2 --list-files I get

There is no file in folder '/'. There is no file in folder '/store_00020002'. There is no file in folder '/store_00020002/DCIM'. There is 1 file in folder '/store_00020002/DCIM/100PHOTO'.

#1 FOO_0008.MP4 rd 83232 KB video/mp4 There is 1 file in folder '/store_00020002/DCIM/Camera'.

#2 20161222_130348.jpg rd 604 KB image/jpeg There are 2 files in folder '/store_00020002/SYSTEM'.

#3 Device.xml rd 1 KB application/x-unknown

#4 license.txt rd 199 KB text/plain

In my case the file number is 1 and I issue

gphoto2 -d 1

which returns the following error

*** Error ***   There are no files in folder '/'.
*** Error (-2: 'Bad parameters') ***

Perhaps i am interpreting the usage incorrectly?

Usage: gphoto2 [-?qvalLnPTDR] [-?|--help] [--usage] [--debug] [--debug-loglevel=STRING] [--debug-logfile=FILENAME] [-q|--quiet] [--hook-script=FILENAME] [--stdout] [--stdout-size] [--auto-detect] [--show-exif=STRING] [--show-info=STRING] [--summary] [--manual] [--about] [--storage-info] [--shell] [-v|--version] [--list-cameras] [--list-ports] [-a|--abilities] [--port=FILENAME] [--speed=SPEED] [--camera=MODEL] [--usbid=USBIDs] [--list-config] [--list-all-config] [--get-config=STRING] [--set-config=STRING] [--set-config-index=STRING] [--set-config-value=STRING] [--reset] [--keep] [--keep-raw] [--no-keep] [--wait-event=COUNT, SECONDS, MILLISECONDS or MATCHSTRING] [--wait-event-and-download=COUNT, SECONDS, MILLISECONDS or MATCHSTRING] [--capture-preview] [--show-preview] [-B|--bulb=SECONDS] [-F|--frames=COUNT] [-I|--interval=SECONDS] [--reset-interval] [--capture-image] [--trigger-capture] [--capture-image-and-download] [--capture-movie=COUNT or SECONDS] [--capture-sound] [--capture-tethered=COUNT, SECONDS, MILLISECONDS or MATCHSTRING] [--trigger-capture] [-l|--list-folders] [-L|--list-files] [-m|--mkdir=DIRNAME] [-r|--rmdir=DIRNAME] [-n|--num-files] [-p|--get-file=RANGE] [-P|--get-all-files] [-t|--get-thumbnail=RANGE] [-T|--get-all-thumbnails] [--get-metadata=RANGE] [--get-all-metadata] [--upload-metadata=STRING] [--get-raw-data=RANGE] [--get-all-raw-data] [--get-audio-data=RANGE] [--get-all-audio-data] [-d|--delete-file=RANGE] [-D|--delete-all-files] [-u|--upload-file=FILENAME] [--filename=FILENAME_PATTERN] [-f|--folder=FOLDER] [-R|--recurse] [--no-recurse] [--new] [--force-overwrite] [--skip-existing]

1

Try :

gphoto2 -f /store_00020002/DCIM/100PHOTO -d 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.