May be you have something in BIMP (it's a plug in for GIMP) BIMP stands for "Batch Manipulation Image"
https://alessandrofrancesconi.it/projects/bimp/
or
In Filters > G'MIC > Various > Custom Code[] , here you go to input some code to increment a number -> you can affect ALL layers,
if you need helps they all are on https://discuss.pixls.us/c/software/gmic/10
they all are very nice gals/guys whiling to help with code
https://alessandrofrancesconi.it/projects/bimp/
or
In Filters > G'MIC > Various > Custom Code[] , here you go to input some code to increment a number -> you can affect ALL layers,
if you need helps they all are on https://discuss.pixls.us/c/software/gmic/10
they all are very nice gals/guys whiling to help with code