All Questions
2 questions
11
votes
2
answers
11k
views
Create sub-directories and organize files by date
I have some directories of files copied from my security camera that I would like to organize into sub-directories by file date. So for example;
-rwxrwxrwx 0 root root 4935241 Jul 19 2012 DSCN1406....
5
votes
2
answers
2k
views
Create sub-directories and organize files by date from file name
I have been using the following script to organize my photos into "Date' Directories:
for x in *.JPG; do
d=$(date -r "$x" +%Y-%m-%d)
mkdir -p "$d"
mv -- "$x" "$d/"
done
This script works great. ...