# Delete from a specific character to the end

**URL:** <https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429>\
**Category:** Support\
**Created:** [February 22, 2022, 8:26am UTC](https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429 "2022-02-22T08:26:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yankl](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/ecd19e/32.png) [@yankl](https://community.mp3tag.de/u/yankl)\
**Post date:** [February 22, 2022, 8:26am UTC](https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429/1 "2022-02-22T08:26:00Z")

</div>

Sorry for the bad English ...  
When exporting a file, I want it deleted from the file name from a character / example to the end of the file name.  
That is, the file names:  
001 Algebra / Eighth Grade Lesson  
002 Engineering Class / 5th Grade  
003 Accounting Lesson / 6th Grades  
I want it deleted after the check /  
And the result will be:  
001 Algebra  
002 Engineering Class  
003 Accounting Lesson  
What should I define?  
By the way, do not want to rename the file, only in the export file.  
Thanks!!

---

<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:** [February 22, 2022, 8:28am UTC](https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429/2 "2022-02-22T08:28:41Z")

</div>

Try Converter\>Filename-Filename  
Source mask: %1 / %2  
Target: %1

---

<div class="post-metadata">

**Author:** ![yankl](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/ecd19e/32.png) [@yankl](https://community.mp3tag.de/u/yankl)\
**Post date:** [February 22, 2022, 11:37am UTC](https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429/3 "2022-02-22T11:37:53Z")

</div>

Thank you very much for the response.  
I do not want to rename the file, just know what code to write in the export file.  
As a follow-up to this:

```auto
$filename(M1036-1.tts,utf-8) $loop(%year%,1) $cutLeft(%_filename%,4) $replace(%track%,01,1,02,2,03,3,04,4,05,5,06,6,07,7,08,8,09,9).
$loopend()

```

Thank you!

---

<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:** [February 22, 2022, 11:44am UTC](https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429/4 "2022-02-22T11:44:09Z")

</div>

> [@yankl](#):
>
> `$cutLeft(%_filename%,4)`

You want this part to be changed to something that only write the file names until the first `/` character?

---

<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:** [February 22, 2022, 12:52pm UTC](https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429/5 "2022-02-22T12:52:36Z")

</div>

> [@yankl](#):
>
> just know what code to write in the export file.

try  
`$regexp(%whatever%,\s*/.*,)`

> [@yankl](#):
>
> `$replace(%track%,01,1,02,2,03,3,04,4,05,5,06,6,07,7,08,8,09,9)`

could be shortened to  
`$num(%track%,1)`

---

<div class="post-metadata">

**Author:** ![yankl](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/ecd19e/32.png) [@yankl](https://community.mp3tag.de/u/yankl)\
**Post date:** [February 22, 2022, 1:19pm UTC](https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429/6 "2022-02-22T13:19:18Z")

</div>

> [@ohrenkino](#):
>
> $regexp(%whatever%,\s\*/.\*,)

Excellent!!!  
I thank you very much!!!

---

<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:** [February 9, 2026, 12:29pm UTC](https://community.mp3tag.de/t/delete-from-a-specific-character-to-the-end/56429/7 "2026-02-09T12:29:40Z")

</div>


