I just published an Applescript on Github (“Image auto-rename and annotate.applescript”), that renames selected images according the scheme
img######
I.e., the new names will consist of “img
” and a running number. The number will be increased every time the script is run. In this way, each renamed image file gets a unique file name. This reduces file name ambiguity which, e.g., becomes a crucial point when using DEVONthink’s WikiLinks feature. It also makes images better distinguishable from other files in DEVONthink’s search.
The original file names will be stored in the images’ Finder comments for which the script offers the following options:
Replace with current image name: The current comment will be replaced by the current image name.
Replace with custom text: The current comment will be replaced by a custom text.
Replace with custom text + increasing number: The current comment will be replaced by a custom text and an increasing number will be attached to that text.
Don’t replace current annotation: The current comment will not be replaced.
Remove current annotation and leave empty: Removes the current comment and leaves it empty.
Add current image name: The current image name will be added to the current comment.
Add custom text: A custom text will be added to the current comment.
Add custom text + increasing number: A custom text with an attached increasing number will be added to the current comment.
Please, find further instructions for the script in the repository’s README file.
This script is part of my image workflow for Markdown files. A second script creates Markdown/HTML image link sets and reuses the stored Finder comments as optional image captions.