Skip to content

Instantly share code, notes, and snippets.

@MisterSirCode
Last active December 23, 2022 04:31
Show Gist options
  • Save MisterSirCode/687f86302c32b9be7aa89fee6ea79e8b to your computer and use it in GitHub Desktop.
Save MisterSirCode/687f86302c32b9be7aa89fee6ea79e8b to your computer and use it in GitHub Desktop.
Bulk Convert WAV to CAF and move into root directory
#!/bin/bash
shopt -s globstar
src_dir="audio"
dest_dir="audio_new"
mkdir "$dest_dir"
for f in "${src_dir}"/**/*.wav; do
name=${f##*/}
ffmpeg -i "$f" "${dest_dir}/${name%.wav}.caf"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment