Skip to content

Instantly share code, notes, and snippets.

@nicinabox
Last active Apr 12, 2017
Embed
What would you like to do?
#!/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

nicinabox commented Apr 12, 2017

❯ 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