This is the script I use to convert FLAC files to MP3. After converting, it moves all the FLAC files into a subdirectory named .flac:
#!/bin/bash #------------------------------------------------------------------------------ # Converts all FLAC files in the current folder to high-quality VBR MP3s. # Moves all .flac files into a folder named .flac. #------------------------------------------------------------------------------ for f in *.flac; do ffmpeg -i "$f" -qscale:a 0 "${f[@]/%flac/mp3}" done mkdir .flac mv *.flac .flac/ echo Done.
This script requires ffmpeg. Install using:
sudo apt-get install ffmpeg