sort wallpaper by dimensions

5 05 2010

Let’s say you have one large folder of wallpaper/backdrops and your tired of picking the wrong one because its dimensions are wrong for your screen. Well this script is one you might enjoy.

———————–
#!/bin/bash

## Description:let’s sort images/wallpaper into folders based on dimensions
##Depends: imagemagick

for i in $( find . -iname ‘*.jpg’ )
do
dim=`identify -format %w_x_%h $i`;
mkdir -p sorted/$dim
mv $i sorted/$dim
done


Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.