# Help with Created an Action to remove trailing space from filename

**URL:** https://community.mp3tag.de/t/help-with-created-an-action-to-remove-trailing-space-from-filename/59633
**Category:** Support
**Created:** [January 6, 2023, 10:10pm UTC](https://community.mp3tag.de/t/help-with-created-an-action-to-remove-trailing-space-from-filename/59633 "2023-01-06T22:10:42Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [January 6, 2023, 10:19pm UTC](https://community.mp3tag.de/t/help-with-created-an-action-to-remove-trailing-space-from-filename/59633/2 "2023-01-06T22:19:46Z")

</div>

What do your tags look like?  
You could then rewrite the filename with Convrt\>Tag-Filename  
Format string: `$trim(%artist% - %title%)`

Also, a look at the FAQs could be helpful:

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967/10):
>
> How to remove/trim leading and trailing spaces [Video tutorial for these actions](http://www.vimeo.com/7756545) Leading spaces: Action type: Replace with regular expressions Field: \_TAG Regular expression: ^\s+ Replace matches with: ^ matches the beginning of the string. Then \s+ searches for all whitespaces till a different char occurs. The whitespaces found will be replaced by nothing and, thus, deleted. Trailing spaces: Action type: Replace with regular expressions Field: \_TAG Regular expression: \s+$ Replace matc…

---

_[View the full topic](https://community.mp3tag.de/t/help-with-created-an-action-to-remove-trailing-space-from-filename/59633)._
