I use the file explorer called ranger and I wonder if it is possible to open many files in different directory with mplayer?What I can already do is to select all the files (pressing v) from one directory and then press Enter. Mplayer is launched and all the files in that directory are played one after the other.But what if I want to play a list of files that are in different directories?EDIT: To be more general, I'd like to know how to run a command that takes files from different directories as arguments.
ranger: open many files with mplayer
mplayer;file manager;file opening;ranger
Here is my solution for playing all files in a directory and all subdirectories with mplayer2 and ranger in random order. It's is not exactly the answer to the question, but maybe you can expand it.First I wrote a shell script called ptv:#!/bin/shif [[ -z $1 ]]; then  echo usage: $(basename $0) directory [count]else  if [[ ! -z $2 ]]; then    SHUFPARAM=-n$2  fi  PLAYLIST=/tmp/playlist-$(whoami)  CWD=$(realpath $1)  find $CWD -type f -iname \*.mkv -or -iname \*.mp4 -or -iname \*.avi | shuf $SHUFPARAM > $PLAYLIST && \    mplayer2 --playlist=$PLAYLIST && rm -f $PLAYLISTfiThis script finds all my movie files in a given directory, creates a random ordered playlist and calls mplayer2 with this generated playlist. Leave the shuf command out, if you want a sorted list.Next step is to edit rifle.conf in your settings directory (~/.config/ranger). Add this line:directory, label pseudoTV, has mplayer2, flag f = /path/to/ptv $@Now you can use the script to open_with (mapped to key: r) with mplayer2. In mplayer2 you can navigate with < and > between the playlist items.TIP: Copy your directories directories to the yank_buffer and save it in ranger. Then expand ptv to find files in all your selected directories...