# Utilize number of selected files in scripting

**URL:** <https://community.mp3tag.de/t/utilize-number-of-selected-files-in-scripting/61703>\
**Category:** Support\
**Created:** [July 30, 2023, 5:12pm UTC](https://community.mp3tag.de/t/utilize-number-of-selected-files-in-scripting/61703 "2023-07-30T17:12:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeckenrode](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@mazeckenrode](https://community.mp3tag.de/u/mazeckenrode)\
**Post date:** [July 30, 2023, 5:12pm UTC](https://community.mp3tag.de/t/utilize-number-of-selected-files-in-scripting/61703/1 "2023-07-30T17:12:03Z")

</div>

I would like to create an action group that utilizes the number of selected files, as well as the selection number of each selected file. The Auto Numbering Wizard (ANW) is obviously capable of retrieving and utilizing that data, and MP3Tag’s status bar also displays how many files are selected, but I’m looking to do something other than track- and disc-number as done by the ANW, and not seeing any way to get or use either piece of information via scripting. Is there a way to do this? If not, can this be considered a feature request?

---

<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:** [July 30, 2023, 5:16pm UTC](https://community.mp3tag.de/t/utilize-number-of-selected-files-in-scripting/61703/2 "2023-07-30T17:16:15Z")

</div>

See the documentation on totals:

> **[Format Strings and Placeholders – Mp3tag Documentation](https://docs.mp3tag.de/format/#global-placeholders-for-export)**
>
> Documentation on format strings and placeholders to describe the structure of file names and imported data. Mp3tag is the universal Tag Editor.

I just checked `%_total_files%` and it returned the number of selected files.

---

<div class="post-metadata">

**Author:** ![mazeckenrode](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@mazeckenrode](https://community.mp3tag.de/u/mazeckenrode)\
**Post date:** [July 30, 2023, 6:31pm UTC](https://community.mp3tag.de/t/utilize-number-of-selected-files-in-scripting/61703/3 "2023-07-30T18:31:38Z")

</div>

> [@ohrenkino](#):
>
> I just checked `%_total_files%` and it returned the number of selected files.

Ah, check. The doc threw me off with the way that section was worded:

> **Global placeholders for Export**
> 
> Providing totals for the preceding `$loop` / `$loopend`

(…since I was neither exporting nor using `$loop`.)

Thanks!

---

<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:** [August 29, 2023, 6:31pm UTC](https://community.mp3tag.de/t/utilize-number-of-selected-files-in-scripting/61703/4 "2023-08-29T18:31:54Z")

</div>

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