Skip to content

Instantly share code, notes, and snippets.

@nicinabox
Last active April 12, 2017 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicinabox/a441bc369efb4cc19ab1ded7a8992da1 to your computer and use it in GitHub Desktop.
Save nicinabox/a441bc369efb4cc19ab1ded7a8992da1 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Usage: rolls.sh PATH
for path in $1/**; do
dirname=`basename "$path"`
for file in $path/**; do
exiftool -overwrite_original -headline="roll $dirname" "$file"
done
done
@nicinabox
Copy link
Author

❯ tree rolls
rolls
├── 001
│   └── Screen\ Shot\ 2017-04-12\ at\ 13.40.58.png
├── 002
│   └── Screen\ Shot\ 2017-04-12\ at\ 13.41.10.png
└── 003
    └── Screen\ Shot\ 2017-04-12\ at\ 13.41.17.png

3 directories, 3 files

Will write exif headline with roll 001 (image parent directory name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment