You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Correct execution of Delete file group http command #872
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?
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
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.
Activity
[-]https://gopro.github.io/OpenGoPro/http#tag/Media/operation/GPCAMERA_DELETE_FILE_GROUP[/-][+]Correct execution of Delete file group http command[/+]Gerardo545 commentedon Oct 4, 2026
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.