by oftenwrong · 8y ago · 0 comments
set -eu
AGE_LIMIT=$(( `date +%s` - (14 * 86400) ))
for FILE in ~/Downloads/*
do
if [ -e "$FILE" ]
then
export `stat -s "$FILE"`
if [ $st_birthtime -lt $AGE_LIMIT ]
then
mv "$FILE" "~/Needing review/"
fi
fi
done
Run it from cron. Typical caveats of shell scripts apply! find ~/Downloads -Btime +14d -exec mv {} ~/Needing\ review \;
Some changes may be necessary as I am not able to test it right now