# multiple replacement scheme when renaming?

**URL:** https://community.mp3tag.de/t/multiple-replacement-scheme-when-renaming/4090
**Category:** General Discussion
**Created:** [November 21, 2006, 7:09pm UTC](https://community.mp3tag.de/t/multiple-replacement-scheme-when-renaming/4090 "2006-11-21T19:09:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![thzxcyl](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@thzxcyl](https://community.mp3tag.de/u/thzxcyl)
#### Post date: [November 21, 2006, 7:09pm UTC](https://community.mp3tag.de/t/multiple-replacement-scheme-when-renaming/4090/1 "2006-11-21T19:09:12Z")

</div>

My tag data sometimes has characters w/ accents like á â ä etc. I want to keep those there, but when I rename my file I don't want those charater to mess with the display screen since I use systems with different languages. So I want to replace all those "á â ä" with a plain "a" when renaming. I guess I can use a nested $replace script, but since there are so many things to replace, it probably would get out of control. Any idea how to do it?

Thanks

EDIT: one other question: how can I extract the first part of discnumber? (e.g. I want only x but the discnumber field is x/y)

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [November 21, 2006, 11:01pm UTC](https://community.mp3tag.de/t/multiple-replacement-scheme-when-renaming/4090/2 "2006-11-21T23:01:46Z")

</div>

Filenames are saved in unicode on windows or do you want to use the files outside of windows?

There's no one step function for this.  
Maybe $ansi() can help for certain chars. Best way is to set up an action group with regular expressions.  
For example  
RE: [áâä] Replace with: a  
...

> [@](#):
>
> EDIT: one other question: how can I extract the first part of discnumber? (e.g. I want only x but the discnumber field is x/y)

$num(%discnumber%,1)

---

<div class="post-metadata">

### Author: ![thzxcyl](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@thzxcyl](https://community.mp3tag.de/u/thzxcyl)
#### Post date: [November 22, 2006, 1:55pm UTC](https://community.mp3tag.de/t/multiple-replacement-scheme-when-renaming/4090/3 "2006-11-22T13:55:45Z")

</div>

Thank you very much! An action group will do the trick. As for the discnumber, $num will not work since I have some discnumber \> 10, but I got the idea - perhaps I can detect "/" in discnumber and get the string before occurence of "/"

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [November 22, 2006, 2:11pm UTC](https://community.mp3tag.de/t/multiple-replacement-scheme-when-renaming/4090/4 "2006-11-22T14:11:34Z")

</div>

$num() works, please try it first.
