# Script for renaming and moving folders

**URL:** https://community.mp3tag.de/t/script-for-renaming-and-moving-folders/71451
**Category:** Mac
**Created:** [June 16, 2026, 11:56am UTC](https://community.mp3tag.de/t/script-for-renaming-and-moving-folders/71451 "2026-06-16T11:56:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![octavesandtremelos](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/f07891/32.png) [@octavesandtremelos](https://community.mp3tag.de/u/octavesandtremelos)
#### Post date: [June 16, 2026, 11:56am UTC](https://community.mp3tag.de/t/script-for-renaming-and-moving-folders/71451/1 "2026-06-16T11:56:16Z")

</div>

Hi, I've been using Mp3tag for a while, but never gone past the very basic tagging of files. I am trying to automate a few of my processes and I'm after a bit of assistance with something I am now struggling with.

So I have two folders on my Mac, 'Sorted' and 'Unsorted'. After ripping a CD or downloading an album from the www, it is stored in the unsorted folder until I get round to applying tags. I have a few things in an Action Group which work well and I am happy with. However, I wondered if there is a another script I can add to the Action Group, to automatically rename the files and move them from the 'Unsorted' folder, into my 'Sorted' folder, renaming the album folder in the process?

**What I Have...**

~/Music/Unsorted/%albumartist%/[%year%] %album%

**What I Want...**

~/Music/Sorted/%albumartist%/%origyear% - %album% [%year% ・ %publisher% ・ %catalognumber%]

Thank you for listening 👍

---

<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: [June 16, 2026, 11:58am UTC](https://community.mp3tag.de/t/script-for-renaming-and-moving-folders/71451/2 "2026-06-16T11:58:54Z")

</div>

Perhaps this section from the documentation already helps:

> [@Rename Files and Import Tags from Files](https://community.mp3tag.de/t/rename-files-and-import-tags-from-files/51720):
>
> Mp3tag provides a variety of possibilities to get tag information from parts of the filename or to rename files based on the information stored in the tag of a file. The base concept behind all converters in Mp3tag is the format string, which describes a pattern or template of a filename. A format string consists of any characters and predefined placeholders or scripting functions. Every placeholder begins with the percent sign %, followed by a tag field name and ends with the percent sign. …

---

<div class="post-metadata">

### Author: ![octavesandtremelos](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/f07891/32.png) [@octavesandtremelos](https://community.mp3tag.de/u/octavesandtremelos)
#### Post date: [June 16, 2026, 12:07pm UTC](https://community.mp3tag.de/t/script-for-renaming-and-moving-folders/71451/3 "2026-06-16T12:07:21Z")

</div>

It does indeed help! Thank you so much. I don't know how I missed it 🤦‍♂️

I did however, forget another bit of my question. How do I stop the %catalognumber% field being put into the filename if there is no catalogue number present?

Thanks once again

---

<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: [June 16, 2026, 12:10pm UTC](https://community.mp3tag.de/t/script-for-renaming-and-moving-folders/71451/4 "2026-06-16T12:10:34Z")

</div>

> [@octavesandtremelos](#):
>
> ~/Music/Sorted/%albumartist%/%origyear% - %album% [%year% ・ %publisher% ・ %catalognumber%]

Have you tried  
`~/Music/Sorted/%albumartist%/%origyear% - %album% '['%year% ・ %publisher%[・ %catalognumber%]']'`

---

<div class="post-metadata">

### Author: ![octavesandtremelos](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/f07891/32.png) [@octavesandtremelos](https://community.mp3tag.de/u/octavesandtremelos)
#### Post date: [June 16, 2026, 12:13pm UTC](https://community.mp3tag.de/t/script-for-renaming-and-moving-folders/71451/5 "2026-06-16T12:13:48Z")

</div>

> [@ohrenkino](#):
>
> ~/Music/Sorted/%albumartist%/%origyear% - %album% '['%year% ・ %publisher%[・ %catalognumber%]']'

You absolute diamond!! Thank you so so 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: [June 23, 2026, 12:13pm UTC](https://community.mp3tag.de/t/script-for-renaming-and-moving-folders/71451/6 "2026-06-23T12:13:56Z")

</div>

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