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.el.gz.
Signature
(image-dired-copy-with-exif-file-name)
Documentation
Copy file with unique name to main image directory.
Copy current or all marked files in dired to a new file in your
main image directory, using a file name 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
function. The result is a couple of new files in
image-dired-main-image-directory called
2005_05_08_12_52_00_dscn0319.jpg,
2005_05_08_14_27_45_dscn0320.jpg etc.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/image-dired.el.gz
(defun image-dired-copy-with-exif-file-name ()
"Copy file with unique name to main image directory.
Copy current or all marked files in dired to a new file in your
main image directory, using a file name 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
function. The result is a couple of new files in
`image-dired-main-image-directory' called
2005_05_08_12_52_00_dscn0319.jpg,
2005_05_08_14_27_45_dscn0320.jpg etc."
(interactive)
(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)))