Function: image-dired-copy-with-exif-file-name

image-dired-copy-with-exif-file-name is an interactive and byte-compiled function defined in image-dired-dired.el.gz.

Signature

(image-dired-copy-with-exif-file-name)

Documentation

Copy file with unique name to main image directory.

Copy current or all files marked in Dired to new file(s) in your main image directory, using file name(s) generated by image-dired-get-exif-file-name. A typical usage for this if when copying images from a digital camera into the image directory.

Typically, you would open up the folder with the incoming digital images, mark the files to be copied, and execute this command. The result is one or more new files in image-dired-main-image-directory, named like
2005_05_08_12_52_00_dscn0319.jpg,
2005_05_08_14_27_45_dscn0320.jpg etc.

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/image/image-dired-dired.el.gz
(defun image-dired-copy-with-exif-file-name ()
  "Copy file with unique name to main image directory.
Copy current or all files marked in Dired to new file(s) in your
main image directory, using file name(s) generated by
`image-dired-get-exif-file-name'.  A typical usage for this if when
copying images from a digital camera into the image directory.

Typically, you would open up the folder with the incoming
digital images, mark the files to be copied, and execute this
command.  The result is one or more new files in
`image-dired-main-image-directory', named like
2005_05_08_12_52_00_dscn0319.jpg,
2005_05_08_14_27_45_dscn0320.jpg etc."
  (interactive nil dired-mode)
  (let (new-name
        (files (dired-get-marked-files)))
    (mapc
     (lambda (curr-file)
       (setq new-name
             (format "%s/%s"
                     (file-name-as-directory
                      (expand-file-name image-dired-main-image-directory))
                     (image-dired-get-exif-file-name curr-file)))
       (message "Copying %s to %s" curr-file new-name)
       (copy-file curr-file new-name))
     files)))