summaryrefslogtreecommitdiffhomepage
path: root/musicSorter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'musicSorter.rb')
-rw-r--r--musicSorter.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/musicSorter.rb b/musicSorter.rb
index 30c4f75..7b9a9dc 100644
--- a/musicSorter.rb
+++ b/musicSorter.rb
@@ -10,8 +10,13 @@ errors = Array.new
illegalCharacter = Array['/', '?', '\\', ':', '*', '"', '<', '>', '|']
songsDirectory = ARGV[0]#Where you want your organized songs to end up
+if songsDirectory == nil
+ puts "Invalid Directory Given"
+ exit(1)
+end
if !Dir.exist?(songsDirectory)
puts "Invalid Directory Given"
+ exit(1)
end
#All extensions you want considered and moved
@@ -99,3 +104,4 @@ end
for error in errors
puts error
end
+