# Rename folder by using date

**URL:** https://community.mp3tag.de/t/rename-folder-by-using-date/60483
**Category:** Support
**Created:** [March 25, 2023, 8:19am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483 "2023-03-25T08:19:31Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jerryfreak](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/85f322/32.png) [@jerryfreak](https://community.mp3tag.de/u/jerryfreak)
#### Post date: [March 25, 2023, 8:19am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/1 "2023-03-25T08:19:31Z")

</div>

i tried this and it was semi-successful

> [@Create Folders Name From Tag](https://community.mp3tag.de/t/create-folders-name-from-tag/17407/2):
>
> There are 2 more or less automatic ways to get a new files and folder structure with the help of MP3tag: If you already have the right amount of folders - only the have not yet got the correct name, then try something like this: Load the files, select them (you can load files from several albums at once). Create an action of the type "Format value" for \_DIRECTORY Format string: %artist% - %album% - %year% and "Bad" should become "Michael Jackson - Bad - 1991" provided, the fields are fille…

it did rename the subfolders, but the date format was not what i was looking for

they ended up as  
Artist - Album (YYYY-MM-DD)  
where the MM-DD was 01-01

not  
Artist - Album (YYYY)

how do i control output format to YYYY for this purpose?

---

<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: [March 25, 2023, 8:33am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/2 "2023-03-25T08:33:37Z")

</div>

Please show us the mask that you used and tell us which action you applied.

To remove anything non-numeric from a string, try $num().

---

<div class="post-metadata">

### Author: ![jerryfreak](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/85f322/32.png) [@jerryfreak](https://community.mp3tag.de/u/jerryfreak)
#### Post date: [March 25, 2023, 8:53am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/3 "2023-03-25T08:53:11Z")

</div>

my problem is a lot of files were auto-downloaded with 'date' tag enabled, and the year fields show YYYY-MM-DD

is there a batch action to convert date from YYYY-MM-DD to YYYY? otherwise i am sorting them by year and manually editing each year by batch

---

<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: [March 25, 2023, 8:53am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/4 "2023-03-25T08:53:59Z")

</div>

Have you tried the $num() function?  
Which field contains the long date?

---

<div class="post-metadata">

### Author: ![jerryfreak](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/85f322/32.png) [@jerryfreak](https://community.mp3tag.de/u/jerryfreak)
#### Post date: [March 25, 2023, 8:57am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/5 "2023-03-25T08:57:05Z")

</div>

year field

also using the  
%artist% - %album% (%year%)

when there are non-music files like folder.jpg  
it is putting the tracks into a new subfolder alongside folder.jpg

i want to rename the folder and leave everything intact

so it goes from  
Artist - Album  
-music fles  
-folder.jpg

to

Artist - Album  
-Artist - Album (year)  
--music files  
-folder.jpg

when i want

Artist - Album (year)  
-music files  
-folder.jpg

---

<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: [March 25, 2023, 8:58am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/6 "2023-03-25T08:58:42Z")

</div>

> [@jerryfreak](#):
>
> %artist% - %album% (%year%)

Try  
`%artist% - %album% ($num(%year%,1))`

---

<div class="post-metadata">

### Author: ![jerryfreak](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/85f322/32.png) [@jerryfreak](https://community.mp3tag.de/u/jerryfreak)
#### Post date: [March 25, 2023, 9:00am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/7 "2023-03-25T09:00:01Z")

</div>

> [@ohrenkino](#):
>
> %artist% - %album% ($num(%year%,1))

its cool i want to manually fix the year tags first anyway. just need to keep the files together instead of making new subfolders fo rthe music files

---

<div class="post-metadata">

### Author: ![jerryfreak](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/85f322/32.png) [@jerryfreak](https://community.mp3tag.de/u/jerryfreak)
#### Post date: [March 25, 2023, 9:20am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/8 "2023-03-25T09:20:10Z")

</div>

separate issue

where i have disc subfolders i have

Album - Artist  
-Disc 1  
-Disc 2

I want

Album - Artist (Year)  
-Disc 1  
-Disc 2

but its merging the disc 1 and disc 2 by tags, resulting in

Album - Artist  
-Album - Artist (Year)  
-misc non music files like folder.jpg

how do i only rename the top folder and leave disc folders intact?

---

<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: [March 25, 2023, 9:34am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/9 "2023-03-25T09:34:58Z")

</div>

You can only rename the current folder.  
If this is the folder with the disc in the name, then this one will be renamed.  
You could try an absolute path with  
`d:\mymusic\ ...`  
It could be, though, that the original folder without the YEAR is left over.

---

<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: [April 24, 2023, 9:35am UTC](https://community.mp3tag.de/t/rename-folder-by-using-date/60483/10 "2023-04-24T09:35:45Z")

</div>

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