Forrest logo
back to the for tool

for:ai:bb05e

how do i convert a folder of .wavs into .mp3s?
$ for file in *.wav; do ffmpeg -i $file ${file%.wav}.mp3; done
try on your machine

This CLI command uses ffmpeg to convert a folder of .wavs into .mp3s. It iterates over each .wav file in the folder, converts it to .mp3 using ffmpeg, and saves the converted file with the same name but with the .mp3 extension.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • how do i convert a folder of .wavs into .mp3s?
back to the for tool