babusha

Untitled

May 29th, 2011
500
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/ruby -Ku
  2. require 'rbsh/commands/find'
  3.  
  4. $dir = "/home/babusha/Загрузки/Nautilus Pompilius/Первые издания"
  5. Dir.chdir $dir
  6. find(%w[-type f]).each do |m4a|
  7.     next if not m4a =~ /.m4a/
  8.     wav = m4a.gsub(/.m4a/,'.wav')
  9.     puts "Converting #{m4a} => #{wav}"
  10.     system "mplayer -ao pcm:file='#{wav}' '#{m4a}'"
  11. end
RAW Paste Data