IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> Strange Tag to Filename issue
AMJF
post Mar 21 2015, 13:31
Post #1


Member


Group: Full Members
Posts: 94
Joined: 15-May 13
Member No.: 17930
Mp3tag Version: 1.0



I have the following script running on the Alt-1 process Tag>Filename:

%albumartist%\%album%\$num(%discnumber%,1) $num(%track%,2) %albumartist%

Every time I run an action or a script I do a refresh of the screen (F5) beforehand, and most of the time when it's done the message is "(number) of (total) files renamed", and I always look for the 0 in (number) to confirm that everything's gone fine.

But sometimes a situation will come up, like an album has the exact same name as the album artist, and then no matter how many times I run the above script and refresh the screen, it will always say that some files have been renamed.

Why is this?
Go to the top of the page
 
+Quote Post
ohrenkino
post Mar 21 2015, 13:45
Post #2


Member


Group: Full Members
Posts: 9021
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84b



This seems to be a very local problem.
You may want to check if the spelling in all fields is exactly the same for all files in respect to the metadata that renames the folders.
I still wonder, why you do not use the title as data in the filename as you have the albumartist already in the foldername ....
I do not think that it has to do with the similarity between albumartist and album but much more if the case and other spellings are the same between the files.
So, a "Fleetwood Mac" would be different from "FLEETWOOD MAC".


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
AMJF
post Mar 21 2015, 14:01
Post #3


Member


Group: Full Members
Posts: 94
Joined: 15-May 13
Member No.: 17930
Mp3tag Version: 1.0



I just tried renaming an album's albumartist to the same name as the album, apart from the case which is different in each, and I'm still getting the problem.

On a related note, one album I'm trying to process comes up with the error that says the file couldn't be renamed because it couldn't find the specified file. I don't know why this is, only that the album name, title AND album artist tags are REALLY LONG - ridiculously long, in fact. I don't know how to proceed.
Go to the top of the page
 
+Quote Post
DetlevD
post Mar 21 2015, 14:04
Post #4


Member


Group: Full Members
Posts: 6639
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.84b



QUOTE (AMJF @ Mar 21 2015, 13:31) *
... sometimes a situation will come up ... it will always say that some files have been renamed.

If you are making changes on names within the filesystem (filename, foldername) ...
as you are doing so, ... then you have to make sure not to use forbidden characters.
Apply ... function $validate ...
$validate(%ALBUMARTIST%'\'%ALBUM%'\'$num(%DISCNUMBER%,1)' '$num(%TRACK%,2)' '%ALBUMARTIST%,'_')
... or ...
$validate(%ALBUMARTIST%'\'%ALBUM%'\'$num(%DISCNUMBER%,1)' '$num(%TRACK%,2)' '%ALBUMARTIST%,)


DD.20150321.1405.CET

This post has been edited by DetlevD: Mar 21 2015, 14:06


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
AMJF
post Mar 21 2015, 14:29
Post #5


Member


Group: Full Members
Posts: 94
Joined: 15-May 13
Member No.: 17930
Mp3tag Version: 1.0



Tried your scripts, DetLevD, still kept saying files had been renamed no matter how often I ran the script and refreshed.

I've also discovered that if I apply JUST the disc and track numbers in the filename (nothing else), then that album I mentioned with the very long tags will rename just fine.
Go to the top of the page
 
+Quote Post
DetlevD
post Mar 21 2015, 14:48
Post #6


Member


Group: Full Members
Posts: 6639
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.84b



QUOTE (AMJF @ Mar 21 2015, 14:01) *
... error that says the file couldn't be renamed because it couldn't find the specified file. I don't know why this is, only that the album name, title AND album artist tags are REALLY LONG - ridiculously long, in fact. I don't know how to proceed.

There is a method which can help against too long filepathnames ...
http://forums.mp3tag.de/index.php?showtopi...ost&p=81246

DD.20150321.1448.CET



--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
DetlevD
post Mar 21 2015, 15:13
Post #7


Member


Group: Full Members
Posts: 6639
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.84b



QUOTE (AMJF @ Mar 21 2015, 14:29) *
... still kept saying files had been renamed no matter how often I ran the script and refreshed. I've also discovered that if I apply JUST the disc and track numbers in the filename (nothing else), then that album I mentioned with the very long tags will rename just fine.

It looks like as the status message will be triggered in all cases when the entire filepathname has been touched and folders has been renamed or created.

DD.20150321.1520.CET

This post has been edited by DetlevD: Mar 21 2015, 15:20


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
AMJF
post Mar 21 2015, 15:58
Post #8


Member


Group: Full Members
Posts: 94
Joined: 15-May 13
Member No.: 17930
Mp3tag Version: 1.0



I'm going to try this script for Tag > Filename:

QUOTE
$trim($left(%albumartist%,40)) $trim($left(%album%,40))\$num(%discnumber%,1) $num(%track%,2) $trim($left(%albumartist%,40))


The two albums that I mentioned that didn't work with the previous script DO work with this one, it seems. What's more, I prefer the album artist AND the album to be in the same single folder as I had before, and I use album artist for the tracks as well, as I don't tend to use the file mode in players.

The only thing I found I had to do was to limit the length of all the various strings, and I like to trim strings as well.
Go to the top of the page
 
+Quote Post
AMJF
post Mar 21 2015, 16:03
Post #9


Member


Group: Full Members
Posts: 94
Joined: 15-May 13
Member No.: 17930
Mp3tag Version: 1.0



Also, I have to ask, what use is $validate when it seems that all illegal characters for filenames are filtered out when Alt-F1 is used anyway? I gave a random album illegal characters like "/" and ran the first script without $validate and the "/" was filtered out in any case.

Go to the top of the page
 
+Quote Post
DetlevD
post Mar 21 2015, 17:35
Post #10


Member


Group: Full Members
Posts: 6639
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.84b



QUOTE (AMJF @ Mar 21 2015, 16:03) *
Also, I have to ask, what use is $validate when it seems that all illegal characters for filenames are filtered out when Alt-F1 is used anyway? I gave a random album illegal characters like "/" and ran the first script without $validate and the "/" was filtered out in any case.

I do not understand what you mean with ...
"filtered out when Alt-F1 is used anyway", ... please explain.

The following characters are not allowed to be used within a filename ...
$char(124)$char(92)$char(63)$char(62)$char(60)$char(58)$char(47)$char(42)$char(34)$char(31)$char(30)$char(29)$char(28)$char(27)$char(26)$char(25)$char(24)$char(23)$char(22)$char(21)$char(20)$char(19)$char(18)$char(17)$char(16)$char(15)$char(14)$char(13)$char(12)$char(11)$char(10)$char(9)$char(8)$char(7)$char(6)$char(5)$char(4)$char(3)$char(2)$char(1)$char(0)
... but Mp3tag's dialog "Tag - Filename" does not remove all these characters.
For example ... Mp3tag accepts the backslash as a valid character for the filename.

Further on ...
$validate($char(124)$char(92)$char(63)$char(62)$char(60)$char(58)$char(47)$char(42)$char(34)$char(31)$char(30)$char(29)$char(28)$char(27)$char(26)$char(25)$char(24)$char(23)$char(22)$char(21)$char(20)$char(19)$char(18)$char(17)$char(16)$char(15)$char(14)$char(13)$char(12)$char(11)$char(10)$char(9)$char(8)$char(7)$char(6)$char(5)$char(4)$char(3)$char(2)$char(1)$char(0),'#')
... creates a preview of ...
#\####### .mp3
... which is a rather weird filename ...
and it demonstrates, that the function $validate does not validate all forbidden characters.

About invalid characters look there ...
http://forums.mp3tag.de/index.php?showtopi...ost&p=38673

I do not believe that Mp3tag accepts the / slash character as part of the filename.
Try it out in Mp3tag Listview column to insert a slash into the filename, ...
then you will receive an error message.

The / slash character is not registered as an invalid path character ...
it is the valid path separator on Apple Mac and UNIX systems and also used for web addresses, ...
and for example, ...
someone can use the slash character as the path separator within the Explorer address line.

DD.20150321.1845.CET

This post has been edited by DetlevD: Mar 21 2015, 18:44


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
ohrenkino
post Mar 21 2015, 18:30
Post #11


Member


Group: Full Members
Posts: 9021
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84b



ZITAT(AMJF @ Mar 21 2015, 16:03) *
... what use is $validate...

$validate() lets you set the character that is used as a replacement for an illegal character. Naturally, it is not possible to create illegal filenames. The OS would not allow it.
But as the illegal characters are simply cut out, this might not suit your requirements, so you can set that you get an indication that there would have been an illegal character.


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
AMJF
post Mar 21 2015, 19:14
Post #12


Member


Group: Full Members
Posts: 94
Joined: 15-May 13
Member No.: 17930
Mp3tag Version: 1.0



QUOTE (AMJF @ Mar 21 2015, 16:03) *
Also, I have to ask, what use is $validate when it seems that all illegal characters for filenames are filtered out when Alt-F1 is used anyway? I gave a random album illegal characters like "/" and ran the first script without $validate and the "/" was filtered out in any case.


When I said the above, I meant that I took a random MP3 album and changed the "album" tag in all the tracks so that it had a "/" at the end of it, and when I ran the Alt-1 script I mentioned before, the "/" was filtered out. Sorry for the confusion.
Go to the top of the page
 
+Quote Post
AMJF
post Mar 21 2015, 19:26
Post #13


Member


Group: Full Members
Posts: 94
Joined: 15-May 13
Member No.: 17930
Mp3tag Version: 1.0



QUOTE (ohrenkino @ Mar 21 2015, 18:30) *
$validate() lets you set the character that is used as a replacement for an illegal character. Naturally, it is not possible to create illegal filenames. The OS would not allow it.
But as the illegal characters are simply cut out, this might not suit your requirements, so you can set that you get an indication that there would have been an illegal character.


Thanks for the explanation, Ohrenkino, although I know from personal experience about illegal characters, from Windows itself telling me when I make a typo during filename entry to my own research when I was developing filename-dependent applications.

I think I ought to explain why I put the album artist into the album tracks in the filenames when I use Alt-1: this is simply because I create my own albums out of my own recordings some of the time, and during the process I might want to edit my title tags as I make corrections, and put simply, it's a lot easier to not use the title tags (as the album artist tag is much less likely to change) so I don't have to Alt-1 the album each time.

In any case, I see the folders and files as mere placeholders for the REAL core of the MP3 audio and tags, which are much less unlimited in the characters the tags use, and they can be much longer anyway. And it's what most users see on media players. I see no advantage to "Folder Mode" on any such player.
Go to the top of the page
 
+Quote Post
ohrenkino
post Mar 21 2015, 19:42
Post #14


Member


Group: Full Members
Posts: 9021
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84b



ZITAT(AMJF @ Mar 21 2015, 19:26) *
...In any case, I see the folders and files as mere placeholders for the REAL core of the MP3 audio and tags, which are much less unlimited in the characters the tags use, and they can be much longer anyway. And it's what most users see on media players. I see no advantage to "Folder Mode" on any such player.

You are quite right: the filename is only a surrogate for the real data. There are numerous limitations for filenames, so in general, the only rule there is: they have to comply with the rules of the file system but are void in respect to data keeping.
Yet, it may sometimes be fairly useful to get a hint what a particular file is about without having to start the respective presentation program. Usually, with other files for other applications like word processing or spread sheets, one uses a filename that gives a summary of the contents.
The naming scheme relies mainly on the individual requirements and may differ from (personal) environment to environment.


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
AMJF
post Mar 21 2015, 23:39
Post #15


Member


Group: Full Members
Posts: 94
Joined: 15-May 13
Member No.: 17930
Mp3tag Version: 1.0



After much trial and error, I finally found that this script for Tag>Filename works just fine with every album I threw at it:

CODE
$trim($left(%albumartist%,40))  $trim($left(%album%,40))\$num(%discnumber%,1) $num(%track%,2)  $trim($left(%title%,40))


And I've finally converted my whole collection this way, which should make things easier. And yes, I decided on titles for the tracks, just to make it friendlier for Folder Mode in media players.

Thanks for the info!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd September 2017 - 13:54