#1 : 05/04-25 07:16 Jamil
Posts: 7
|
I am attempting to rename a combination of folder and FLAC files using Advanced Renamer based on tag content. I am currently struggling to get the Year from the flac tag to rename as a part of my directory structure of Windows 11. My directories are set as follows for my audio library:
<Album artist>\<Year>, <Album>\<Tracknumber>-<Title> <Year> returns the current year - 2025. <Audio Year> returns zero. <Date> returns the current date 2025-04-05. Under Mediainfo, my FLAC files I am attempting to rename contain a tag "Recorded date" that is set to 1984. The i under Advnaced Renamer shows Date tag set to 1984. Unfortunately, <Date> is not returning 1984 and returns the current system date. |
#2 : 05/04-25 07:50 Styb
Posts: 173
|
Reply to #1:
If you have found the Date tag in the exiftool section, you need to use <ExifTool:Date>. Yes, the <Audio Year> doesn't work for all types of audio files, it needs to be fixed. |
#3 : 05/04-25 07:58 Jamil
Posts: 7
|
Reply to #2:
Thank you. <ExifTool:Date> works for the year. However, I am getting an error attempting to combine directories with file names. The name does not like backslashes. Switching to rename folders does not allow referencing the Year tag from files in the directory. Rename files does allow referencing the tag, but I then cannot rename folders. |
#4 : 05/04-25 09:52 Delta Foxtrot
Posts: 459
|
Reply to #3:
Hi Jamil, The operating system does not allow the use of backslashes in a filename, because they have special meaning in file paths. And the only way to change filenames and directory names at the same time is with javascript, and even then you can't rename the folder, you have to move the file to a new directory named with the "item.newPath" program variable. A simple script to do this would be something like: //---------------------------------------------------- drive = app.parseTags('<foldername:-1>'); newName = app.parseTags('<ExifTool:Tracknumber>-<ExifTool:Title>'); item.newPath = drive + app.parseTags(':\\NewMusicDir\\<ExifTool:Artist>\\<ExifTool:Date>, <ExifTool:Album>\\'); return newName; //---------------------------------------------------- This renames the files to <ExifTool:Tracknumber>-<ExifTool:Title> It moves the renamed files to a directory on the current drive named NewMusicDir\<Artist>\<Date>, <Album>\ You can of course change "NewMusicDir" to whatever you'd like. That's about the simplest way I know of to do what you want, and of course you'll need to preview it to make sure the filenames are correct and the new path is correct (hint: add the "newpath" column to your files list to see where the files will go). If you do make a mistake you can of course use "Undo batch" to revert everything, but do it before you make more changes. If that doesn't work for you let me know what's wrong and I'll try to fix it. Also, it probably won't work exactly as you'd like for compilations or anthology albums. Good luck! Best, DF |
#5 : 05/04-25 13:27 Jamil
Posts: 7
|
Reply to #4:
Thank you for the JavaScript assistance. I actually use AlbumArtist to group my albums as opposed to Artist. AlbumArtist is always a single Artist per album (even for collections or greatest hits; I simply use the label that released the collection as the AlbumArtist). I will play around with this a bit more to learn about the features. The fact that this tool supports so many tags is a great feature |
#6 : 05/04-25 15:06 Delta Foxtrot
Posts: 459
|
Reply to #5:
Hello Jamil, Did you mean <Audio Artist>? I don't have <Album Artist> in the metadata of my flac files. Either way, just change the "item.newPath = " line to item.newPath = drive + app.parseTags(':\\NewMusicDir\\<Album Artist>\\<ExifTool:Date>, <ExifTool:Album>\\'); -or- item.newPath = drive + app.parseTags(':\\NewMusicDir\\<Audio Artist>\\<ExifTool:Date>, <ExifTool:Album>\\'); (whichever gets you the correct results). Best, DF |
#7 : 05/04-25 20:01 Jamil
Posts: 7
|
Reply to #6:
AlbumArtist is a standard tag just like Artist is. The difference is that AlbumArtist was intended to be consistent across an entire album. Artist is specific for a single track on an album. AlbumArtist exists for all audio types (MP3, FLAC, M4A, etc.). |
#8 : 05/04-25 20:18 Jamil
Posts: 7
|
Reply to #7:
One suggestion I have for a future enhancement is to add syntax to a path that allows a path to be ignored for rename processing. For an example of what I mean, let's use curly braces as an example: { } Take the following example: <Album artist>\<ExifTool:Date>, <Album>{\<Tracknumber>-<Title>} Notice the above in curly braces. This means read the file at that specific location but do not process it for renaming. This would be useful to retrieve tag information that may then be used for directory renaming. In my case, it would be <Album artist> that only exists in audio files. The portion within curly braces would be ignored for all renaming processing. However, it would allow tag information to be populated allowing use for directory renaming. |