Xah Lee has a nice post that shows how to open files in an external app or on the desktop from Emacs. When opening files in an external application, the current visited file will be opened unless you’re in a dired
buffer in which case all the marked files are opened.
There are two functions: one to open the file(s) in an external application and the other to open the current file in the OS’s file manager. In the first case, “open” means to do whatever clicking on the file would do.
What I like about this code is that it handles the three cases of Windows, OS X, and Linux. In each case you have to do something a little different. Even if you don’t have a need for these functions, the Elisp code is handy as a go by for writing functions to perform similar tasks.