Created
August 22, 2011 16:09
-
-
Save gauravpaliwal/1162778 to your computer and use it in GitHub Desktop.
Shell Script to rename and decrease size of photo in one go
This file contains 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
#rename JPG to jpg | |
for i in *.JPG; | |
do mv $i `basename $i JPG`jpg; | |
done | |
#resizing photos | |
for i in *.JPG; | |
do convert $i -resize 600x400 $(basename $i .JPG).JPG; | |
done | |
#source : http://playingwithsid.blogspot.com/2010/08/how-to-resize-photos-with-bash-shell.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment