Skip to content

rename images: preserve extension with option to change + option to willingly move files. - #714

Open
anoderay wants to merge 6 commits into
darktable-org:masterfrom
anoderay:rename_revamped
Open

rename images: preserve extension with option to change + option to willingly move files. #714
anoderay wants to merge 6 commits into
darktable-org:masterfrom
anoderay:rename_revamped

Conversation

@anoderay

@anoderay anoderay commented Sep 8, 2026

Copy link
Copy Markdown

Supersedes #712 and #713

Enhances the existing rename_images.lua:

  • Preview button for renaming pattern
  • Ensure we always rename with a valid extension with the option to change to a custom extension (because darktable always expects a valid extension as demonstrated by Renaming without file extension causes crash darktable#21684)
  • Various sanitizations of special characters etc.: forbidden filesystem characters (<>:"|?* + control characters) always replaced with -
  • Give the option to move files. The current behaviour when using / or \ in the renaming pattern was confusing and IMHO produced unintuitive results.
    • when allow moving files is "off" \ and / resolve to -.
    • When allow moving files is "on" a relative path from the current location of the image is constructed.
    • Absolute paths are not supported but IMHO this is necessary to safeguard against moving files to the filesystem root etc.
grafik

@wpferguson I`d be happy if you could take a look :-).

Co-Created with Claude Sonnet 5.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant