Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Move screenshots from the Desktop to a dedicated Screenshots folder.
#!/bin/sh
#
# Maintenance script run on a weekly basis (controlled by launchd and the
# associated plist file located at ~/Library/LaunchAgents/local.cleanupdesktop.plist
#
# Move all screenshot files on the Desktop into the folder Screenshots
# Check for the existence of the Screenshots folder. Create it if it doesn't exist.
if [ ! -d ~/Desktop/Screenshots ]; then
mkdir ~/Desktop/Screenshots
fi
# Move all screenshot files to the Screenshots folder
mv ~/Desktop/*Screen\ Shot* ~/Desktop/Screenshots/
mv ~/Desktop/Screenshot* ~/Desktop/Screenshots/ # Move screenshots taken by my tss script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment