Sort files by date to directory

echo "Please wait while I sort your files by date."
for a in *.jpeg; do
date -r $a +%y%m%d >/dev/null && {
dof=$(date -r $a +%y%m%d)
if [ ! -d $dof ]; then
mkdir $dof
fi
mv $a $dof/
}
done

, , , ,

No comments yet.

Leave a Reply

*

Powered by recycled bites and bytes.