How to rename my folder

Hello, how to rename(reappoint) my file following the code: %artist% ~ %album%, but if the name of the album is empty I want that my file is renamed only like that: %artist%

To rename a folder (not file)
you can apply an action of the type "Format tag field" for _DIRECTORY
Format string: %artist%[ ~ %album%]

The square brackets enclose an optional part that is only used if the referenced field is filled with data.

Use the converter Tag - Filename and the format string

$if(%album%,%artist% ~ %album%,%artist%)

But I can't see any sense in naming mp3-files only by "artist - album" or even worse by only "artist".
There will be a lot of duplicate filenames.
You better think it over.

Actually, if you use the converter it is not necessary to use the rather complicated $if statement - instead, simply add square brackets:
%artist%[ ~ %album%]
I agree on the statement on the sensibility of renaming files to just the artist name. Should also not work for folders with albums...

Thank you for your answers but if the folder is renamed it moves me and I get two files with different names. I would like it to me renome but are not used in a double. What to do?

The converter is for the filename. Renaming just a single file does not affect the folder. In fact, the folder may remain where it was, but empty if you specify a filename with path-parts in it (using the backslash ).
If you want to rename a folder, use the Convert>Tag-Tag function for _directory.
Enter as string the new path.
The current folder will be renamed and take all the files that were in that folder to the new location.

Super thank you.

How can this by done by just renaming the album folder, the current method affects Artwork folders.

How is your folder-structure and what is your "current method"?

F:\Music%artist%\AlbumFolder*\Discs**%tracks%

  • Album folder not always named %album% tag of contained tracks- which is the goal to rename it as such

**Single disc albums will be AlbumFolder/tracks

All tracks inside and album folder has the same %album% tag- so i just needs to grab it from one file.

Without renaming, the closest I can do is create a new album folder inside the original- which is not what I want.

Try an action of the type "Format value" for _DIRECTORY
Format string: F:\Music\%artist%\%album%
This renames the current folder to the pattern provided by the tag fields.
It does not create new folders - so the number of source folders has to be equal to or greater than the number of target folders.

When I follow the directions here to rename the directory, the end result is correct. However, it looks like it is creating the new directory, move the files, then delete old directory. I am using Format value. Is a way to just rename the folder without moving or touching the content of the folder? When I run this on folders with multiple CD's, it is combining all the tracks in each CD to one directory, which is not what the desired effect is.

Thanks

You would have to show us ...
... which function you used
... which parameters you entered in the function.

Thanks for replying.
I am using:
Format value "_DIRECTORY": %Artist% - ALBUM - %year% - %album%

This is before: (Album) [2015] Some Artist Name - Some Album (flac+cue+log)
This is the desired outcome: Some Artist Name - ALBUM - 2015 - Some Album

With this format, it is moving all the tracks into renamed folder where there are multiple CD's. So basically, it not just renaming the folder, it is doing processing within the folder.
Please let me know if you need more information.

Thanks

2 things:
could you follow the advice in this post:

esp. in respect to mark up code parts. Like that path looks strange.

Then: how would MP3tag know that you have

This is the current folder structure:

(Album) [2015] Joss Stone - Never Forget My Love (flac+cue) (2 CDs)
-- CD1
-- CD2
-- folder.jpg
-- tracklist.txt

Desired output:
Joss Stone - ALBUM - 2015 - Never Forget My Love
-- CD1
-- CD2
-- folder.jpg
-- tracklist.txt

What MP3Tag is doing:
(Album) [2015] Joss Stone - Never Forget My Love (flac+cue) (2 CDs)
-- Joss Stone - ALBUM - 2015 - Never Forget My Love
-- *CD1 and CD2 folders were deleted and all tracks moved here
-- folder.jpg
-- tracklist.txt

Yes, I know.
But how does MP3tag know that there is an album with several CDs?
Have you filled the field DISCNUMBER?
MP3tag always takes the current folder for _DRIECTORY.
So if there is a folder called CD1 it gets renamed as you specified it - and in your mask is no reference to the CD number.
And the same happens to the folder CD2. And if you look closely, then your mask for _DIRECTORY will produce the same string.

There is a Disc Number in the tags and it is filled out. What I'm trying to do is just rename the folder based off of Artist, Album and Year tag without doing anything else within the folder. It looks like MP3Tag is trying to read every file and move them, which is not what I'm trying to do. I don't need the content of the folder moved or processed. Hope this makes sense. So regardless of whether the disc number tag is present or not, it doesn't come into play because we're at the folder level and not within the folder.

A misconception.
The current folder is what is described by _DIRECTORY. And while this "current folder" probably has a name like

it is "CD1" for folders that are 1 level below that.
I asked for the DISCNUMBER as you can set up a mask/string that has an optional part in it and does not get confused by different folder levels if you use an absolute and not a relative path.
My suggestion would be:
Format string: d:\mymusic\%artist%\%artist% - ALBUM - %year% - %album%[\CD$num(%discnumber%,1)]
The part in square brackets only becomes active if there is data in the field DISCNUMBER.
I am sure that you are able to replace the start of the path with your local settings.

Let met try this out :slight_smile: You have been super helpful and thank you for responding so quicky!