# Run a command (Tool) on each file

**URL:** https://community.mp3tag.de/t/run-a-command-tool-on-each-file/14271
**Category:** General Discussion
**Created:** [December 27, 2012, 7:50pm UTC](https://community.mp3tag.de/t/run-a-command-tool-on-each-file/14271 "2012-12-27T19:50:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Hergest](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/db5fbb/32.png) [@Hergest](https://community.mp3tag.de/u/Hergest)
#### Post date: [December 27, 2012, 7:50pm UTC](https://community.mp3tag.de/t/run-a-command-tool-on-each-file/14271/1 "2012-12-27T19:50:32Z")

</div>

I've configured a Tool to run a batch script for each selected file. However, this seems to run an instance simultaneously for each selected file.

This is not good, in that I can't run it on 100's of files simultaneously. The batch script copies the chosen file across my network to another machine and then runs genpuid.exe on that file. I want this to be done on 1 file at a time (synchronously).

I can't find a way to make an action run an external command either.

Any ideas how best to achieve this?

I'm thinking that I'll have to export the list of files to a text file, and then write a DOS batch script to process lines in the file.

---

<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: [December 27, 2012, 8:02pm UTC](https://community.mp3tag.de/t/run-a-command-tool-on-each-file/14271/2 "2012-12-27T20:02:47Z")

</div>

> [@Phil](#):
>
> ...  
> I'm thinking that I'll have to export the list of files to a text file, and then write a DOS batch script to process lines in the file.

You can define the contents of that export file in such a way that it will run as a batch (if you just changed the suffix).

---

<div class="post-metadata">

### Author: ![Hergest](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/db5fbb/32.png) [@Hergest](https://community.mp3tag.de/u/Hergest)
#### Post date: [December 27, 2012, 8:58pm UTC](https://community.mp3tag.de/t/run-a-command-tool-on-each-file/14271/3 "2012-12-27T20:58:19Z")

</div>

> [@ohrenkino](#):
>
> You can define the contents of that export file in such a way that it will run as a batch (if you just changed the suffix).

Good idea, I just export the list of files, formatted with additional text to call the batch script.

Bit of a kludge solution, but it works.

Thanks - saved me a little bit of messing around.
