# Anyway to access the filename?

**URL:** https://community.mp3tag.de/t/anyway-to-access-the-filename/10937
**Category:** Web Sources Discussion
**Created:** [October 12, 2010, 7:43pm UTC](https://community.mp3tag.de/t/anyway-to-access-the-filename/10937 "2010-10-12T19:43:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![monty68](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@monty68](https://community.mp3tag.de/u/monty68)
#### Post date: [October 12, 2010, 7:43pm UTC](https://community.mp3tag.de/t/anyway-to-access-the-filename/10937/1 "2010-10-12T19:43:11Z")

</div>

I want to be able to access the filename (without the file extension) within  
a web source script, any way to do this?

The reason is I want to pre-append the filename to the title for TV shows.

The %\_filename% variable does not seem to work in the web source script engine!

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [October 12, 2010, 8:54pm UTC](https://community.mp3tag.de/t/anyway-to-access-the-filename/10937/2 "2010-10-12T20:54:00Z")

</div>

Funny, I just tried the same. I also found no way to get it work. What I tried:  
outputto "filename"  
outputto "\_filename"  
outputto "FILENAME"  
outputto "\_FILENAME"  
all do not work.

But you can help yourself with an action group:  
Include something like:  
outputto "dummy filename"  
in your script. After running your script, run an action group with to actions:

1st:  
Format Tag Field:  
Field: \_FILENAME  
String: %dummy filename%

2nd:  
Delete Tag Field:  
Field: DUMMY FILENAME

---

<div class="post-metadata">

### Author: ![monty68](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@monty68](https://community.mp3tag.de/u/monty68)
#### Post date: [October 13, 2010, 8:57pm UTC](https://community.mp3tag.de/t/anyway-to-access-the-filename/10937/3 "2010-10-13T20:57:17Z")

</div>

Hmm, nice little work around there, thanks.

Really hoping the developers could add this little change in to an upcomming (next) release.

Hint, hint, please, beg grovel 😃

---

<div class="post-metadata">

### Author: ![monty68](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@monty68](https://community.mp3tag.de/u/monty68)
#### Post date: [October 16, 2010, 9:09am UTC](https://community.mp3tag.de/t/anyway-to-access-the-filename/10937/4 "2010-10-16T09:09:24Z")

</div>

Well I took your hint and knocked up a little Action script that does the job for me 😃

Still be nice to get to the %\_filename% within the web source script though 😉

[Add\_Filename\_to\_Title.mta](https://community.mp3tag.de/uploads/default/original/2X/e/ee55e96db428954e0feb23b291e4e4e936d9d3c1.mta) (111 Bytes)

---

<div class="post-metadata">

### Author: ![monty68](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@monty68](https://community.mp3tag.de/u/monty68)
#### Post date: [May 5, 2015, 7:20am UTC](https://community.mp3tag.de/t/anyway-to-access-the-filename/10937/5 "2015-05-05T07:20:48Z")

</div>

Been a long while since I have been on the forum 🙂

I still require the ability to access the filename type variables within a web sources  
script, please any chance this could be added in, this time I want to load up  
a local XML file to extract tag data from rather than collect from a true web source

i.e.

[AlbumUrl]=file://%\_filename%.nfo

---

<div class="post-metadata">

### Author: ![monty68](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@monty68](https://community.mp3tag.de/u/monty68)
#### Post date: [June 1, 2015, 10:53am UTC](https://community.mp3tag.de/t/anyway-to-access-the-filename/10937/6 "2015-06-01T10:53:10Z")

</div>

Sorry to pester but really would like to know if this feature could be added, it would save me hours?

Just want to know if its on the to-do list or not 🙂
