latest hacks

This commit is contained in:
2020-07-05 17:40:35 -07:00
parent eb0549a511
commit b93b7d52f7
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
#!/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