Convert tags to filenames questions


#1

I intend to use a new folder structure. The is my prefered format:
%artist%\%year% - %album%$num(%track%,2) - %title%

Question: When using the script Tag - Filename the music files are moved and renamed correctly. The problem is that my covers, txt files etc stay behind in the in the old folder. Is there a way to bypass this?

Question 2: I also want to add the codec or bitrate. I prefer bitrate but when using this code:
%artist%\%year% - %album% (%_bitrate%)$num(%track%,2) - %title%
All the files end up in different folders. This is because the bitrate differs for every fole. How can i keep using bitrate and keep all files in the same album folder?


#2

I can only answer the First Question:

Mp3tag only deals on a case by case basis with Music Files and some Video Files (*.aac; *.ape; *.apl; *.asf; *.flac; *.mp+; *.mp1; *.mp2; *.mp3; *.mp4; *.m4a; *.m4b; *.mpc; *.ogg; *.ofr; *.ofs; *.spx; *.tta; *.wma; *.wv; *.mp4; *.m4a; *.spx; *.ofr; *.ofs; *.tta; *.m4b; *.apl; *.mp+; *.tak; *.oga; *.oga; *.flc; *.m4v). The rest is just ignored if you move them to a different location from within Mp3tag.

To move the other files you can use a File Manager or Explorer.

EDIT 22:17: Pone's post Convert tags to filenames questions is accurate, my post wasn't correct, so please ignore.


#3

Use:
Action: Fomat Value
Field: _DIRECTORY
Formatstring: %artist%\%year% - %album% (%_bitrate%)

This moves all files incuding jpg, txt, whatever.
For the bitrate, the value of the first file is taken, but all files are moved into the same folder this way.


#4

Thank you for the fast replies. I am almost there.

Original directory:
../music/001 - Michael Jackson - 1982 - Thriller

With the action it gets like this:
../music/001 - Michael Jackson - 1982 - Thriller/Michael Jackson/1982 - Thriller (2008 25th Anniversary Edition) (1052)

If possible i needs to get rid of "/001 - Michael Jackson - 1982 - Thriller/". Like this:
../music/Michael Jackson/1982 - Thriller (2008 25th Anniversary Edition) (1052)

I do hope this is possible.


#5

Enter a format string that is a fully qualified and not onyl a relative path.

So append the mask
%artist%\%year% - %album% (%_bitrate%)
to
m:\music\%artist%\%year% - %album% (%_bitrate%)

where "m:\music" is only a guess that your absolute path may look like this.


#6

That's strange.
If it was
..\music\001 - Michael Jackson - 1982 - Thriller
before it should now be
..\music\Michael Jackson\1982 - Thriller (2008 25th Anniversary Edition) (1052)

Could it be that it was something like
..\music\001 - Michael Jackson - 1982 - Thriller\cd1
before?

In this case, you can use:
Action: Format Value
Field: _DIRECTORY
Formatstring: .
before you do the action above, to move all files in the parent directory.

Another option would be to use full pathes as formatstring:
Action: Format Value
Field: _DIRECTORY
Formatstring: C:\Users<your windows user name>\music\%artist%\%year% - %album% (%_bitrate%)


#7

No. It was "..\music\001 - Michael Jackson - 1982 - Thriller\01 - Wanna Be Startin' Somethin'.flac

This worked, I used the following Formatstring:
D:\temp\%artist%\%year% - %album% (%_bitrate%)

Thank you! All albums nicely moved to d:\temp\artist\album :music:


#8

I just encountered a 'problem'. Sometimes I have the same album in different versions. For example Pink Floyd - 1975 - Wish You Were Here. I have 3 different versions of the album:

  1. d:\music\049 - Pink Floyd - 1975 - Wish You Were Here\1975 - Wish You Were Here
  2. d:\music\049 - Pink Floyd - 1975 - Wish You Were Here\1975 - Wish You Were Here (1994 Remaster)
  3. d:\music\049 - Pink Floyd - 1975 - Wish You Were Here\1975 - Wish You Were Here (SBM - 24-Karat Gold Disc)

I used the following action

Ation: Format Value
Field: _DIRECTORY
Formatstring: D:\temp\\%artist%\\%year% - %album% (%_bitrate%)

What happens is that the fist album, in this case 1975 - Wish You Were Here (735), moves to
D:\temp\Pink Floyd\1975 - Wish You Were Here (735)

The other two albums stay in the same directory, d:\music\049 - Pink Floyd - 1975 - Wish You Were Here, but are renamed. They look like this:
d:\music\049 - Pink Floyd - 1975 - Wish You Were Here\Pink Floyd\1975 - Wish You Were Here (1994 Remaster)
d:\music\049 - Pink Floyd - 1975 - Wish You Were Here\\Pink Floyd\1975 - Wish You Were Here (SBM - 24-Karat Gold Disc)
Besides the not moving problem the bitrate is also not there....


#9

To my experience it is not possible to modify a folder structure of different depths with the renaming functions.
All folders have to be on the same level but the Pink floyd versions were on a deeper level.
So you have to filter for these folders and rename them separately.


#10

Thanks. Then i will manually scan all the folders. This may not be the place to ask but does someone know another program that may do this task automatically?


#11

Not that I am aware of.
But you can play with different relative paths starting with ...
1 folder up ==> '..'
2 folders up ==> '....'
3 folders up ==> '......'
... or so ...
... to define the place where the new path string should be anchored.

You can help yourself by filtering the amount of input files by their folderdepth and handle folders resp tracks on different folderdepth by different Formatstrings.
See Mp3tag help manual "Scripting Functions" $folderdepth().

You can create a new column in the list view.
Name: Folderdepth
Value: $folderdepth(%_path%)
Field:
Sorted By:
Numerical:
This will display a number for the depth of the folder, where the file is stored.

Another helpful trick might be to create a new column in the list view, which displays the foldername two steps up.
Name: Folder(-2)
Value: $regexp(%_folderpath%,'.+\\(.+?)\\(.+?)\\(.+?)\\$','$1')
Field:
Sorted By:
Numerical:

A Mp3tag Filter expression would be something like this ....
"$folderdepth(%_path%)" IS 4

See also:
Easy way to get directory names above Parent?

And keep in mind, that once a common node folder on a higher level has been renamed resp. moved, then all included lower folders or foldertrees have been moved too (each file has got a new path).
When repeating the same method on already moved folders, this possibly results into 'artefacts'.

DD.20110411.0958.CEST
Edit.20110411.1803.CEST


Renaming
#12

Thanks again. :music: