Skip to content

Instantly share code, notes, and snippets.

@edenwaith
Last active May 9, 2023 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edenwaith/ade8c68f25225e9ca669ca22003e403b to your computer and use it in GitHub Desktop.
Save edenwaith/ade8c68f25225e9ca669ca22003e403b to your computer and use it in GitHub Desktop.
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