Launch single program for multiple files

Hi all,

I have started looking at the tools/options/tools section to launch an external program (xMedia recode as it happens). This works just fine for a single file but not so well for multiple files. If I select 3 files then 3 copies of the program are launched - one for each file. What I would like is to launch one copy of the program and pass it a CLI argument with all the files in ... delimited with double quotes and separated by a space ... i.e.

"file 1" "file 2" "file 3"

I know that xmedia recode will take such an argument and open one copy with all 3 files loaded. Is this possible at all?

Perhaps this thread helps:

Or try to find out which command line parameter allows to add files to an already open recoder.

Hi Ohrenkino

Thanks for the reply. I have had a look at the export function and have indeed found it to be suitable to make a function (of sorts). I created a custom export that just has the file names in. This is then usee as input to one of my powershell scripts and it works perfectly. I was just wondering if there is a way to do without the extra steps.

I have been all over the Xmedia Recode documentation. I don't think adding to an existing session is an option.

How do you start your "Xmedia recode" from PowerShell? Can you show us your code?

Course I can

$cli="C:\Program Files\XMedia\XMedia Recode.exe"

$file =Get-Content $inp
if ($file -ne "" -and $file -ne $null){
foreach ($li in $file){
$al=$al + ' "' + $li + '"'
Write-Host $li
Start-Process $cli -ArgumentList $al

I could not find any special command line parameter for your GUI tool.

What you could try:
1.) Save a playlist with your selected files (File -> Playlist (selected files))
2a.) Drag and Drop this playlist to your "XMedia Recode.exe"
2b) Write a tool which load your previously saved playlist:

Such a tool would only work, if your playlist has always the same name and the same file location.

Xmedia recode seems to be a GUI for ffmpeg. You could try to directly convert or adjust your files with ffmpeg command line instead of using the GUI for the same command line tool.

Hi LyricsLover,

that works great - thank you... cuts out a step :).

I know xMedia is a front end for ffmpeg and I do have some powershell scripts that manage things directly. Just sometimes I want to drop a bunch of files into the GUI for a bit more granular manipulation.

Here's how I do it:

Hi Ryerman,

interesting thread but I think goes further than I need. I have just implemented the solution from LyricLover and it works pretty good. That will do me for the while :).