You are not logged in.
Is it possible to pick up other metatag information for a file that is not defined within ReNamer? I could not figure out how to do this.
For instance, I was attempting to capture the value within "Part of set" for mp3 files. I would like to use this value to prefix to the track metatag.
Let me add that I could pull the value of the metatags listed in the "Insert" rule using the CalculateMetaTag function such as ID3_Artist. Is the reason that value can be pulled because that is the name of that particular metatag in which case does anybody know the metatag name for "Part of set"? Or is the reason the value can be pulled because the ID3_Artist is defined to Renamer where "Part of set" is not?
Thanks for your help!
Last edited by JM (2008-07-07 20:17)
Offline
Hi!
I don't think there is a tag like that...
But where even Devil can do nothing, you can use PascalScript.
I have changed a bit script written by Fathom and Dennis.
If you will have any more questions, check the original topic first:
http://www.den4b.com/forum/viewtopic.php?id=234
I've added a comparision of current and previous folders to omit unnecessary repeating checking the amount of mp3 files in folder for every file.
Script counts quantity of mp3 files in folder and inserts that value before the filename.
Cheers,
Konrad
var
AudioFiles: TStringsArray;
CurrentFolder, PrevFolder: WideString;
begin
CurrentFolder := WideExtractFileDir(FilePath);
if CurrentFolder <> PrevFolder then
begin
SetLength(AudioFiles, 0);
WideScanDirForFiles(CurrentFolder, AudioFiles, False, False, False, '*.mp3');
end;
if Length(AudioFiles) < 10 then
FileName := '0' + IntToStr(Length(AudioFiles)) + ' ' + FileName
else FileName := IntToStr(Length(AudioFiles)) + ' ' + FileName;
PrevFolder:=CurrentFolder;
end.
Last edited by krtek (2008-07-07 22:13)
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
After some digging around in the internet, I believe the metatag I am looking for is "TPOS", according to ID3v2.3. I noticed the album is "TALB", but when trying to use that as the string for CalculateMetaTag, nothing is returned vs. when I use the ReNamer tag of "ID3_Album" which does return the correct value.
This leads me to think that ReNamer needs to define the metatags in order to use them in PascalScript.
Can the "TPOS" tag be added to ReNamer, which defines the disc number in a multi-disc set?
Thanks
Offline
Ok, so it's about number of CDs, not files on CD...
I don't think the try with "TPOS" metatag will give you any results. I know very little about tags, but what I know about mp3 tags is that if you won't put anything in it, you won't get anything from it. And I don't think, that (among people who make mp3s.) it is very common to add such a tag...
But you can still use PascalScript for the job. If you're familiar with programming, you can try to write a script yourself (it's Delphi with some limitations). You can check scripts included in ReNamer and search forum for "begin end" words to get some examples. A list of functions you can find in ReNamer's manual.
You will probably need procedure WideScanDirForFolders(Dir: WideString; var Folders: TStringsArray;
const Recursive, IncludeHidden, IncludeSystem: Boolean);
If you can't do it yourself, give us as many details as possible. Are the files in separate folders? How can you distinguish to wich part of set the particular file belongs.. Preferably with examples.
Cheers,
Konrad
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
krtek, until support for that tag (search for TPOS here) is added, I don't think PascalScript is going to help here. If the track and disc numbers are embedded in the MP3s, but there's no dir. structure (all the files are in the same dir. for example), then how will PascalScript help to determine that information?
BTW, if support for this tag is to be added, then possibly text such as "1/2" should be converted to "1 of 2".
Last edited by Andrew (2008-07-10 09:32)
Offline
Andrew,
If files are in a mess and the TPOS tag is the only way to determine to which cd they belong, then PascalScript won't help.
But if they are in some order (and we don't know that yet) then it might be useful.
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
Much thanks to everyone. Andrew, great site.
Currently, I have folders with the artist name and then subfolders within the artist for each album. I did not want multiple sub folders within the album folder for each disc of a multi-disc set however. So all tracks are in the album folder and I am using the TPOS (Part Of Set) meta tag for multi-disc sets.
The name for each track is currently the track number and title. I was hoping to use reNamer to change the name to disc-track_title. Or maybe even go to Artist_Album_Year_Disc-Track_Title. Anyway, that was my hope. (Oh, and only using the disc number if it was populated).
Last edited by JM (2008-07-15 00:45)
Offline
Much thanks to everyone. Andrew, great site.
Thanks! That is the official ID3 site with the official tag specs, BTW.
I did not want multiple sub folders within the album folder for each disc of a multi-disc set however. So all tracks are in the album folder and I am using the TPOS (Part Of Set) meta tag for multi-disc sets.
Yeah, it's just as I predicted in my post above, and that's where the problem comes in. Since you don't have the files in sub-folders, the only way to rename the files the way you want is to access the TPOS tag somehow, which ReNamer doesn't seem to support at the moment.
However, there's hope yet! I hope Denis doesn't mind, but I'd like to tell you about a fantastic free utility I found while searching for a solution to your problem. I'm sure until ReNamer natively supports all the ID3v1 and v2 tags, everyone can use the fabulous program called ID3Renamer (http://www.id3renamer.com/download-en.html). I tried out the portable version (it comes as a self-extracting EXE) and was able to do exactly what you're looking for. In fact, I just added a brand new utility to my toolset too, thanks to you! I hope this solves all your problems...
- Andrew
P.S. I was thinking of whether to give the link to the utility here or not, but then decided to go ahead 'cos it's not a general file renaming utility like ReNamer (and thus not a direct competitor) but rather a specialised utility meant only for MP3s. Plus I thought that given its usefulness, everyone should know about it!
P.P.S. Some points to note re. ID3Renamer:
1) There is a setting to make it work with files within subdirectories.
2) If disc is 3/6 in the MP3, it prints 3_6 (the underscore character may be configurable, I didn't check).
3) There is an "Ignore files with blank fields" checkbox that will make it skip the files totally (no renaming done at all) if any of the specified fields/tags are empty. If the checkbox is not checked, then the program will just print a null/empty string if any field/tag is empty.
So if you specify the rename string as something like "%Artist_%DiscNumber_%Title" (just an example; check the exact field names the program accepts), and the Artist is Enigma, Disc Number is 3/6 and Title is Return To Innocence, you'll end up with Enigma_3_6_Return To Innocence.
If however Disc Number is empty and you don't check that checkbox, then you'll end up with Enigma__Return To Innocence (note the double underscore!) I don't know if this can be avoided within the program itself (didn't check), but in case it can't, you can always use ReNamer to correct this by replacing "__" (double underscore) with just "_" (single underscore) in all the files.
4) Specifying the rename string as "%Artist\%Track - %Title" will actually cause subdirectories to be created! This is an awesome feature! Thus if you have all your files in one dir., this will create different subdirs. for each artist and place the properly renamed songs by each artist inside his/her dir. Amazing, right?! (Denis, can ReNamer do something like this in a future version?)
5) No idea about the other features, but it seems to have much more to it, plus I guess this is not the place to elaborate about another program, however good it may be! I've already written a lot about it here (hope no-one minds ) so all I'll say is, explore for yourself!
Last edited by Andrew (2008-07-15 18:30)
Offline
Another great tool for that job is Mp3Tag. It supports regexes to change tags and can do almost anything you can imagine about mp3 tags.
And it's free as well.
To be honest I never use ReNamer with mp3 files, because mp3tag is too good.
And ReNamer is best for all other types of files.
You need to press "Tag to Filename" icon and insert eg. "%artist%\%year% %album%\%DISCNUMBER%_%track%_%title%"
or something similar to do your job.
It will give you a preview of the new filenames with paths for the first file.
You can use $if(condition, "if true part", "if false part")
so you can use
$if(%DISCNUMBER%,%DISCNUMBER%_, "") instead of "%DISCNUMBER%_" in the previous example to insert part of set number only if it's not empty. And so on...
You can check all supported tags in View/Tags...
Cheers,
Konrad
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
Konrad, Mp3tag looks like a great tool as well! Though ID3Renamer has regex support as well, I'm not sure it has the ability to define if conditions like Mp3tag does. Cool... Yet another program added to the old utility chest!
Offline