Skip to content

Commit

Permalink
moving files to special directory
Browse files Browse the repository at this point in the history
  • Loading branch information
akwiatkowski committed May 7, 2012
1 parent dc11b8d commit 957ee12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/bobik_audio_converter.rb
Expand Up @@ -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.