I think that what you're searching for is globbing.
for f in ./SF*/AAA/file1.ppm; do
# do something here with the variable "$f"
# example: echo "$f"
The asterisk in « SF*
» means that there is something after « SF
», so if you have a directory called SFabcd
it'll catch it too.
If you want to specify that what follows « SF
» is a digit:
for f in ./SF[[:digit:]]/AAA/file1.ppm; do
If you want to specify instead that there is only one character (which can be a digit) after it:
for f in ./SF?/AAA/file1.ppm; do
If you want to be precise and say that what follows it is a number, you'd use extglob
shopt -s extglob
for f in ./SF+([[:digit:]])/AAA/file1.ppm; do