/ Published in: Bash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/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
URL: http://punchcut.com/perspectives/posts/better-living-through-shell-scripting