Created
July 9, 2019 14:02
-
-
Save haraki/38ed518ac471af25b3e600c47b9a8633 to your computer and use it in GitHub Desktop.
ディレクトリ内のJPEGファイルの名前を {YYYYMMDD_hhmmss}.JPG に置き換える bash スクリプト
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/bash | |
for file in `find . -name '*.JPG'`; do | |
echo $file | |
date=`date -r $file "+%Y%m%d_%H%M%S"` | |
mv $file "${date}.JPG" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
macOS でのみ動作確認済