1 # contributor: Xah Lee (XahLee.org)
2 # name: process marked files in dired
5 ;; idiom for processing a list of files in dired's marked files
7 ;; suppose myProcessFile is your function that takes a file path
8 ;; and do some processing on the file
10 (defun dired-myProcessFile ()
11 "apply myProcessFile function to marked files in dired."
14 (mapc 'myProcessFile (dired-get-marked-files))
17 ;; to use it, type M-x dired-myProcessFile