You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/bash
|
|
|
|
for FN in *.MOV *.MP4 *.MTS *.mov *.mp4; do
|
|
MTIME="$(stat -f "%Sm" "$FN")"
|
|
# eg "Sep 13 05:02:26 2019"
|
|
NP="$(date -j -f "%b %d %T %Y" "$MTIME" "+%Y/%Y-%m/%Y-%m-%d")"
|
|
if [[ -e "$FN" ]]; then
|
|
mkdir -p "$NP"
|
|
mv "$FN" "$NP"
|
|
fi
|
|
done
|
|
|