Created
February 28, 2015 00:42
-
-
Save jbury/a6b299c6eb7c91e879c4 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
if ARGV.length != 1 | |
puts "I need the path to the files. No more, no less." | |
exit | |
end | |
unless File.directory?(ARGV[0]) | |
puts "That directory, #{ARGV[0]}, doesn't exist... Try again." | |
exit | |
end | |
gameDir=ARGV[0] | |
goodGames = Array.new | |
remainingGames = Dir.entries(gameDir) | |
puts remainingGames.length | |
remainingGames.each { |game| | |
if game.include? "[!]" | |
goodGames << game | |
remainingGames.delete(game) | |
end } | |
puts remainingGames.length | |
puts goodGames.length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment