Last active
October 13, 2022 17:41
-
-
Save iambibhas/d4c5603b4989692e5ace to your computer and use it in GitHub Desktop.
Move your images to creation date wise folders
This file contains hidden or 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
#!/bin/sh | |
SRC_DIR=$1 | |
DEST_DIR=$2 | |
for _file in `find $SRC_DIR -type f`; | |
do | |
DATE=`date -r $_file +%F` | |
DIR="$DEST_DIR$DATE" | |
echo "$_file -> $DIR" | |
mkdir -p $DIR | |
cp -n $_file $DIR | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment