Return to Snippet

Revision: 35291
at November 5, 2010 04:31 by austinhappel


Initial Code
#!/bin/sh

# Assign variables
foldername=desktop`date +%Y%m%d`
src=~/Desktop
stor=~/Storage/$foldername

# Create folders within Storage
# Add folder names here as desired
mkdir $stor
mkdir $stor/Design
mkdir $stor/Images
mkdir $stor/Misc

# Switch directory to Desktop to start
cd $src

# Move files to Storage, sorted into folders
mv *.{psd,eps,ai,indd} $stor/Design
mv *.{png,gif,jpg,jpeg,tif,tiff} $stor/Images
mv * $stor/Misc

Initial URL
http://punchcut.com/perspectives/posts/better-living-through-shell-scripting

Initial Description

                                

Initial Title
Desktop Supersort

Initial Tags
Bash, script, osx

Initial Language
Bash