So I'm trying to send a bunch of marked files to picard with dired's '&' (dired-do-async-shell-command). In the normal command line this opens one instance of picard with all the selected files:

picard 01\ -\ Snail\ -\ Underwater.ogg 02\ -\ Alain\ Johannes\ -\ Kaleidoscope.ogg 

But in dired when I mark a few files and issue & picard I get two instances of picard.

How does one make dired send all mark files into one picard instance?

2 Answers 2


Please read the docstring of dired-do-shell-command, in particular this part:

If there is a ‘*’ in COMMAND, surrounded by whitespace, this runs
COMMAND just once with the entire file list substituted there.

This means you can run the command once just with & picard * RET.


You can use w in Dired to copy the names of the marked files to the kill-ring, for later yanking (pasting).

Then, when you use a command such as & (dired-do-async-shell-command), you can yank that list of files into the shell command input where needed.

  • thx @drew. but what if the application is a GUI app (like picard)? the CLI example was when launching it from shell. if i understand your suggestion, you recommend running a shell after & and from there launching picard FILE1 FILE2. thx! Z
    – zeltak
    Commented Feb 14, 2017 at 15:06
  • Also: using this methodology you need to manually quote all spaces in each file name in the CLI right?
    – zeltak
    Commented Feb 14, 2017 at 15:10
  • See Juri @link0ff's answer, which is a much better answer than mine. I knew there was a way to do that, but I'd forgotten what it was (*).
    – Drew
    Commented Feb 14, 2017 at 23:23
  • For quoting spaces etc. see functionshell-quote-argument.
    – Drew
    Commented Feb 14, 2017 at 23:25

Your Answer

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

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