Make Execute Shell Script run more times inside a For Each loop

Why not loop through the files in the folder in with shell command? I’ve seen a tutorial before with imagemagic that loops through files.