Noob Here. I have about 300 files that I want to split into segments. About 5 seconds each. I figured how to do it for one file, but is there anyway I can do it to the whole folder directory? Been searching online and can't seem to find exactly what I need.

here is what I did for the single file

ffmpeg -i test2.mp4 -c copy -map 0 -segment_time 00:0:05 -f segment output%03d.mp4

would like to do it for all the files at once

Is there a batch command that can do it for all files
If not, is there a way I can put more than one command line into Terminal and run them all at once?
OS - Mac - Monterey - FFMPEG and Brew installed

Real noobie, any help would be appreciated