# Launch single program for multiple files

**URL:** https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336
**Category:** Support
**Created:** [September 11, 2021, 2:16pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336 "2021-09-11T14:16:57Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Everso](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/9de053/32.png) [@Everso](https://community.mp3tag.de/u/Everso)
#### Post date: [September 11, 2021, 2:16pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/1 "2021-09-11T14:16:57Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 11, 2021, 2:54pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/2 "2021-09-11T14:54:25Z")

</div>

Perhaps this thread helps:

> [@Feature Request: Tool parameter options](https://community.mp3tag.de/t/feature-request-tool-parameter-options/14242/):
>
> Using MP3Tag Tools, it is possible to run an external application, and to pass several parameters to the external application. Currently, these parameters are generally limited to fixed text, a single file name, or a filepath. More complex operations require use of the exporting capability to create batch files that run or used as input to the external application. This request relates to the ability to pass a list, e.g. all the file names that are currently selected, to the external applicatio…

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

---

<div class="post-metadata">

### Author: ![Everso](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/9de053/32.png) [@Everso](https://community.mp3tag.de/u/Everso)
#### Post date: [September 11, 2021, 2:59pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/3 "2021-09-11T14:59:15Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [September 11, 2021, 3:19pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/4 "2021-09-11T15:19:02Z")

</div>

> [@Everso](#):
>
> This is then usee as input to one of my powershell scripts and it works perfectly.

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

---

<div class="post-metadata">

### Author: ![Everso](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/9de053/32.png) [@Everso](https://community.mp3tag.de/u/Everso)
#### Post date: [September 11, 2021, 3:29pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/5 "2021-09-11T15:29:30Z")

</div>

Course I can

$cli="C:\Program Files\XMedia\XMedia Recode.exe"  
$al=''  
$inp="D:\input\CHAN\_errors.txt"

$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

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [September 11, 2021, 4:09pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/6 "2021-09-11T16:09:16Z")

</div>

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"  
or  
2b) Write a tool which load your previously saved playlist:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/f/ffe726e044277adcef37ac0f021b41355489d864.png)

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

BTW:  
Xmedia recode seems to be a GUI for [ffmpeg](https://www.ffmpeg.org/). 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.

---

<div class="post-metadata">

### Author: ![Everso](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/9de053/32.png) [@Everso](https://community.mp3tag.de/u/Everso)
#### Post date: [September 11, 2021, 4:57pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/7 "2021-09-11T16:57:41Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [September 11, 2021, 5:21pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/8 "2021-09-11T17:21:07Z")

</div>

Here's how I do it:

> [@passing multiple selected items to external tool](https://community.mp3tag.de/t/passing-multiple-selected-items-to-external-tool/16451/4):
>
> I have not found a way to use "Tools" with a space-separated list of URIs or any other information. Sometimes, checking "for all selected files" causes an application to open once, with all files. But sometimes it results in multiple instances opening, one for each file. A way to overcome this limitation is to use what might be called "Export Tools". (my words) Forum member DetlevD has pioneered this approach. See [/t/10808/1](https://community.mp3tag.de/t/10808/1) To summarize: Create a Mp3tag export script that writes a script…

---

<div class="post-metadata">

### Author: ![Everso](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/9de053/32.png) [@Everso](https://community.mp3tag.de/u/Everso)
#### Post date: [September 11, 2021, 5:29pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/9 "2021-09-11T17:29:56Z")

</div>

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 :).

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [October 15, 2024, 12:45pm UTC](https://community.mp3tag.de/t/launch-single-program-for-multiple-files/54336/10 "2024-10-15T12:45:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
