Skip to content

Correct execution of Delete file group http command #872

Open

Description

@ypcyc

Also 2019 MAX is not supported by OpenGoPro still uses most http commands described here.

I need to delete specific folder (with images) on GoPro, but as I found out I need to do it by also providing the name of 1st image in file group:
https://gopro.github.io/OpenGoPro/http#tag/Media/operation/GPCAMERA_DELETE_FILE_GROUP

When sending this command deletion starts... If I have few files everything works fine and http response with code 200 is returned, but if I need to delete folder with all 999 images the is a timeout or something, sometimes error returns sometimes it's real timeout.

I was trying to set timeouts, read again folder with "new" 1st image in file group as after deletion stating the 1st image in file group is changing.
Then executing deletion again with "new" 1st image in file group. Then continuously doing this again until folder is really gone.
But in most cases GoPro turns some "protection" for incoming commands and is blocking them or it just hangs or something.

So, after all this description can somebody, please describe what would be the best approach to delete the folder?

Activity

  1. changed the title [-]https://gopro.github.io/OpenGoPro/http#tag/Media/operation/GPCAMERA_DELETE_FILE_GROUP[/-] [+]Correct execution of Delete file group http command[/+] on Dec 18, 2025
  2. Gerardo545 commented on Oct 4, 2026

    @Gerardo545

    Different camera (HERO10 with Labs firmware, not the MAX), but we had to do exactly this last week to free the SD on a timelapse camera we can't physically reach, so maybe it helps.

    We gave up on deleting the whole group in one call and deleted file by file instead, with the legacy endpoint /gp/gpControl/command/storage/delete?p=100GOPRO/G0012345.JPG. Each call returns quickly and the camera never got into that "blocked" state. It took about 0.15 s per file at the start, getting slower towards 0.3 s as it went, so roughly 5 minutes for a full folder of ~1000 photos. We deleted two complete folders that way without problems.

    Things that helped: one request at a time, never in parallel; stop the timelapse/capture before starting (while it's capturing the media endpoints answer 503 "busy"); and abort after 3 consecutive errors instead of retrying forever, then check the camera state before continuing.

    One trap if the folder has burst/timelapse groups: in the media list a group comes as one entry with the first and last number, and you have to expand the file names yourself. The number part of the name is always 4 digits (GXXXYYYY.JPG), so pad to 4, not to the length of the first number. We padded wrong, built names that didn't exist and the camera answered 500 to those, which looked like the camera "hanging" when it was really our bad file names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds to be reviewed and assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions