A bash code which prints duration of all the media files (mp4, mp3, wav, aiff, etc.) in a folder is as follows:
for f in *
do
echo $f; ffprobe $f -v quiet -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal
done
An equivalent one-liner:
for f in *; do echo $f; ffprobe $f -v quiet -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal ; done
And example output is
audio2923.wav
0:00:01.091338
audio2924.wav
0:00:01.091338
audio2925.wav
0:00:01.091338
audio2926.wav
0:00:01.091338
audio2927.wav
0:00:01.091338
audio2928.wav
0:00:01.091338