Last active
June 12, 2022 08:26
-
-
Save yannickpulver/c854bb86dc89d5ee11f6b804c6e50f2c to your computer and use it in GitHub Desktop.
Rename DJI HDR images and put them in subfolders
This file contains 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
find . -name 'HDR_*.DNG' -exec rename -p -N ...01 -X -e '$_ = "$_-$N"' {} + | |
find . -name 'HDR_*.JPG' -exec rename -p -N ...01 -X -e '$_ = "$_-$N"' {} + | |
find . -type f -name '*' -exec mv -n '{}' . \; | |
find . -type d -name '*' -exec rm -d '{}' \; | |
mkdir raw | |
find . -type f -name '*.DNG' -exec mv {} raw \; | |
mkdir jpg | |
find . -type f -name '*.JPG' -exec mv {} jpg \; | |
mkdir mov | |
find . -type f -name '*.MOV' -exec mv {} mov \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment