Windows 10 (64 bit), Emacs 26.1

Here my init.el

(require 'openwith)
;; Settings for package "openwith"
(when (require 'openwith nil 'noerror)
  (setq openwith-associations
     (list (openwith-make-extension-regexp '("doc" "docx" "rtf")) "word" '(file))
     (list (openwith-make-extension-regexp '("mpg" "mpeg" "mp3" "mp4" "avi" "wmv" "wav" "mov" "mkv")) "vlc" '(file))
     (list (openwith-make-extension-regexp '("pdf")) "FoxitReader" '(file))
     (list (openwith-make-extension-regexp '("png" "gif" "bmp" "tif" "jpeg" "jpg")) "xnview" '(file))
     (list (openwith-make-extension-regexp '("rdp")) "Remote Desctop Connection" '(file))
     (list (openwith-make-extension-regexp '("xls" "xlsx")) "excel" '(file))
  (openwith-mode 1))

So when I in dired mode enter over file with extension "xls" that start default application Excel and open this file. Nice.

But what about bat and exe files? How I can run it from dired mode?

1 Answer 1


Press W in dired-mode (Emacs 26.1). See also the corresponding answer to question https://emacs.stackexchange.com/a/47522/21506

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.