anyway to retrieve info from a folder name and input it into tag field??


#1

hey first off love the app! I'm always stumbling across new features that are extremely useful... its my first post sorry if it's in the wrong section I'm new to this stuff... ok my questions is... is there anyway I can take the "YEAR" of a album that is in the albums folder/directory name and automatically input it into the %year% id3 field using the actions?? I'm pretty uptight about my music collection so all my songs are organized like this... all my music is divided by genre then within each genre directory is folders for each artist/band then within each artist/band folder is the albums with the format " (year) album name " what I want to do is be able to make a action that takes the year from in-between the () brackets usings the %workingdir% option then input it into all the songs within that folders id3 YEAR field...? hope this makes sense if it's possible and im just missing it any support is appreciated!! if it's not possible then maybe an option in the future ,) thanks in advance


Add "Cd #" to "%ALBUM%" for albums with multiple CDs
#2

OK so I've read a ton and maybe figured it out kinda... my music library directory structure is like this...

%_parentdirectory% == %artist%
%_directory% == (%year%) %album%
%filename% == %track% - %artist% - %title%

so in Filename - Tag...

%artist%'(%year%)' %album%\%track% - %artist% - %title%

I'm pulling the %artist% twice do I have to use %_parentdirectory% still?


#3

Example 1 using converter

Convert | Filename - Tag | ALT+2
Select format string
Format string: Test3.mp3
(%YEAR%) %DUMMY%\%DUMMY%
Preview
YEAR | 2011

Example 2 using action
Action: Guess values
Source format: %_directory%
Guessing pattern: (%YEAR%) %DUMMY%

Example 3 using action
Action: Format value
Field: YEAR
Formatstring: $regexp(%_directory%,'^((\d{4})).+$','$1')

Example 4 using action
Action: Format value
Field: YEAR
Formatstring: $mid(%_directory%,2,4)

Filter

"%_directory%" MATCHES "^\(\d{4}\)"

DD.20111117.1737.CET


#4

Thank you! the multiple examples showing all the different ways of doin it helps a lot and I apologize looking back I can see how my initial question may have made next to no sense and lack information required to answer properly!! I fully understand examples 1 and 2 but the formatstrings in examples 3 and 4 are complicated... would you mind explaining how/why it works so I can understand? I just don't get what Formatstring: $regexp(%_directory%,'^((\d{4})).+$','$1') is doin? please and thanks


#5

All examples 1..4 give the same result.

Example 4 demonstrates the Mp3tag scripting function $mid(), which is one of the basic functions for editing text strings.
See Mp3tag help manual, scripting functions.

Example 3 demonstrates the Mp3tag scripting function $regexp(), which applies a so called "regular expression". A "RegEx" is build out of a mighty but cryptic "regular expression programming language".
See some examples with practical usage within Mp3tag ...
Regular Expressions

DD.20111118.1413.CET


#6

Hey DD thanks for the explanations I looked over some of the stuff in the links u posted and it's way over my head ,) I've got another question... I've got 2 types of filename formats in my collection "%artist% - %title%" (for just single random songs that I dont have the entire album of, basically singles...) and also "%track% - %artist% - %title%" (for all songs in an album folder within the folder of the artist/band) ...anyway I keep all my files names in good condition always one of the two formats I listed above now I want to be able to copy all the info from the Filename into the tags from both tracks with the %track% field in the name and ones without it but not have to separate them... so for example how can I just drag my entire Led Zeppelin folder containing singles and unreleased tracks in the 'Led Zeppelin - Track Name' format and also containing folders that are albums containing songs with the '03 - Led Zeppelin - Ramble On' format and get just the artist and title from the singles and the track artist title from the album tracks? only way I can do it now is by separating them and it takes forever... if I do just %artist% - %title% from Filename -> tags on songs with a track number it cuts off the title.... tried to explain best I can hope makes sense


#7

Use the method "Divide and conquer".

Set Mp3tag filter to: "%_filename%" MATCHES "^(.+?) - (.+?)$"
Work with this set of files.
Use action "Guess values" or converter "Filename - Tag".
Formatstring: %ARTIST% - %TITLE%

Set Mp3tag filter to: "%_filename%" MATCHES "^(.+?) - (.+?) - (.+?)$"
Work with this set of files.
Use action "Guess values" or converter "Filename - Tag".
Formatstring: %TRACK% - %ARTIST% - %TITLE%

DD.20111119.0755.CET


#8

ahh "Devide and Conquer" that's bad@ss! so it's still 2 steps but instead of me having to separate it does it for me? thanks again that was my last question I promise ,)


#9

...I lied i got another question there is some albums that have multiple discs so withing the albums folder there is other folders labeled Cd 1... Cd 2... ... so to get the album name and year from those types i used %_parent_directory% for the source format and (%dummy%) %album% as the guessing pattern to get the album what i would like to do is be able to still extract the album name from the parent directory but also ADD the directory name to the end of the album name.... so since my directory structure is as follows this is what im trying to do...

MUSIC\LED ZEPPELIN\GREATEST HITS\CD 1\00 - LED ZEPPELIN - SONG.MP3

in cases like this when the album has Cd 1 and Cd 2 WITHIN the albums folder i use %_parent_directory% instead of %_directory% to get the album name instead of just Cd 1 but i would like to ADD the Cd 1 to the end of what %_parent_directory% -> (%dummy%) %album% returns.... so instead of the album tag saying "Greatest Hits" i would like it to say "Greatest Hits Cd 1" just so itunes will separate Cd 1 and Cd 2 instead of treating them like one big album....


#10

Filter: "%_filename%" MATCHES "^(.+?) - (.+?) - (.+?)$" AND "%_directory%" MATCHES "^CD\s*\d+$"

Converter: Filename - Tag
Formatstring: %ALBUM%\CD %DISCNUMBER%\%TRACK% - %ARTIST% - %TITLE%
... or...
Action: Guess values
Source format: %_parent_directory%'<!--colorc-->'%_directory%'<!--colorc-->'%_filename%
Guessing pattern: %ALBUM%\CD %DISCNUMBER%\%TRACK% - %ARTIST% - %TITLE%

Action: Format value
Field: ALBUM
Formatstring: %ALBUM%' CD '%DISCNUMBER%

DD.20111119.1637.CET


#11

thanks very much DD that is exactly what I wanted to do!!! ,) ps... is there anything that you DONT know how to do?? your app has the best support hands down! thank you!!!


#12

Hey just thought of something... i recently acquired a compilation pack of some old school dance mix CDs takes me way back but anyway, i just want to edit the odd mp3 here and there and i want to be able to just drag and drop a bunch of songs randomly to the app.... then deal with them once ive got them all in the list. unless i drag them all at once it gets rid of what i have in there and replaces it with what i just added..

Maybe im the only person who desires this feature and if so thats cool but if not maybe u guys should add an option for "accumulative" file additions as apposed to the "auto repopulate" list each time, where adding something new replaces what was already there...

I know maybe people are just using the filters and such to within the app select what they want to edit buuuut... my music library is like 300Gb and i dont have time to just sit around while its adding even a portion of my collection to the list...

Anyway just a suggestion ,) i figure since this app already takes the phrase "be all you can be" to a new level that any additional features would be awesome!! Apologies for my poor grammar and paragraph structure I'm not SMRT (sorry Mike my bad)


#13

Offtopic:

SataS, could you please please put some line breaks in your Posts instead of making it one continuous line, that would make your posts a lot easier to read.

Thank you :smiley: