-
-
Save anonymous/7181221 to your computer and use it in GitHub Desktop.
This file contains 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
require 'fileutils' | |
Dir.glob('/Volumes/Downloads/torrents/Naruto Shippuuden Season 13 720p/*mkv').sort.each do |f| | |
episode = (File.basename(f).scan /\d\d\d/).first | |
file_name = "/Volumes/TV/Naruto Shippuuden/Naruto Shippuuden 13x#{episode.to_i - 260}.mkv" | |
puts "#{episode}: #{f.inspect} => #{file_name.inspect}" | |
FileUtils.cp f, file_name | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment