Skip to content

Instantly share code, notes, and snippets.

@artemch
Created March 17, 2014 09:08
Show Gist options
  • Select an option

  • Save artemch/9596100 to your computer and use it in GitHub Desktop.

Select an option

Save artemch/9596100 to your computer and use it in GitHub Desktop.
Put this script in folder with sound files and run script in terminal. Required Xcode command line tools.
path = Dir.getwd
extensions = ['.m4a','.mp3','.wav']
Dir.foreach(path) do |item|
next if item == '.' or item == '..'
if extensions.include? File.extname(item)
string = 'afconvert -f caff -d ima4 ' + item
output = system(string)
puts "output is #{output}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment