Permalink
Browse files

moving files to special directory

  • Loading branch information...
akwiatkowski committed May 7, 2012
1 parent dc11b8d commit 957ee121ce3042acd69c31410b145090ea7ec6ee
Showing with 8 additions and 0 deletions.
  1. +8 −0 bin/bobik_audio_converter.rb
@@ -47,9 +47,17 @@ def remove_tmp(file)
puts "rm \"#{output}\""
end
+def move_to_other_location(file, ext)
+ dir = file.gsub(/[^\/]+$/,'')
+ output = replace_ext(file, ext).gsub(/,/,'_')
+ puts "mkdir -p \"1DONE/#{dir}\""
+ puts "mv \"#{output}\" \"./1DONE/#{dir}/\""
+end
+
search_files("mpc").sort.each do |f|
puts "\n# --- #{f}"
decode(f)
encode(f, "ogg")
remove_tmp(f)
+ move_to_other_location(f, "ogg")
end

0 comments on commit 957ee12

Please sign in to comment.