Last active
January 30, 2021 03:57
-
-
Save MoralCode/1c3affe1f7c286531eb40f19ccd02b8b to your computer and use it in GitHub Desktop.
A short bash script that non-recursively moves the current directory (which must contain all image files) based on their width.
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
rejectdir="../reject/lowres" | |
for filename in * | |
do | |
width=`identify -format "%w" $filename` | |
if [ $width -ne 2000 ] | |
then | |
mv "$filename" "$rejectdir" | |
echo "moved $width px wide file $filename" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment