Created
June 14, 2015 09:52
-
-
Save anttti/8ddeeefbb763300bc51b to your computer and use it in GitHub Desktop.
Convert a directory of wav files to caf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This line required to prevent trying to convert a file named "*" | |
| # if the directory passed in as the parameter is empty | |
| shopt -s nullglob | |
| for f in $* | |
| do | |
| echo "Converting $f" | |
| cafFileName=$(echo $f | sed -e 's/wav/caf/g') | |
| afconvert -d LEI16 -f 'caff' "$f" "$cafFileName" | |
| done |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: ./convert-to-caf.sh directory/*