Created
July 11, 2015 19:43
-
-
Save WillsonSmith/8966b2890ee7d84f5888 to your computer and use it in GitHub Desktop.
Small script to move screenshots from your desktop to a "screens" folder (mac)
This file contains hidden or 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" | |
##moves files including "Screen Shot" to a temp folder | |
PATH = ARGV[0] ? ARGV[0] : Dir.home() + "/desktop" | |
TEMP_FOLDER = "screens" | |
Dir.chdir(PATH) | |
Dir.mkdir(TEMP_FOLDER) unless Dir.exists?("#{PATH}/#{TEMP_FOLDER}") | |
FileUtils.mv Dir.glob("Screen Shot*.png"), TEMP_FOLDER | |
puts ["all finished π", "bye bye screenshots! π", "nice clean desktop! π»"].sample |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment