Last active
February 25, 2017 04:41
-
-
Save don-smith/6bda80ec1efbf51500e89d04f3164b96 to your computer and use it in GitHub Desktop.
File conversion and clean up for SampleSwap library
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
#!/usr/bin/env sh | |
echo "Converting all aif files to wav ..." | |
find . -type f -name "*.aif" -exec bash -c 'ffmpeg -i "$0" "${0%.*}.wav"' "{}" \; | |
echo "Converting all mp3 files to wav ..." | |
find . -type f -name "*.mp3" -exec bash -c 'ffmpeg -i "$0" "${0%.*}.wav"' "{}" \; | |
echo "Renaming all *.WAV files to *.wav" | |
find . -type f -iname "*.WAV" -exec bash -c 'mv "$0" "${0%.*}.wav"' "{}" \; | |
echo "Making all wav files read-only ..." | |
find . -type f -name "*.wav" -exec chmod 0444 "{}" \; | |
echo "Removing all aif files ..." | |
find . -type f -name "*.aif" -exec rm "{}" \; | |
echo "Removing all mp3 files ..." | |
find . -type f -name "*.mp3" -exec rm "{}" \; | |
echo "All remaining files that are not *.wav:" | |
find . -type f ! -name "*.wav" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment