say i have a lot of folders in the uniform format of
%artist% - yyyy-mm-dd - venue, city, state
i.e
Led Zeppelin - 1973-12-01 - Madison Square Garden, New York, NY
with files named 01. %title%.flac 02. %title%.flac 03. %title%.flac 04. %title%.flac 05. %title%.flac 06. %title%.flac 07. %title%.flac 08. %title%.flac
the track numbers at the beginning of the filename are not tags and not in the tags AFAIK, as the tracks have discnumbers and instead of 1,2,3,4,5,6,7,8 are really disc1 1-5, and disc 2 1-3
id like to automatically parse yymmdd and rename the file from something like 01. Stairway to Heaven.flac
to lz731201d1_01_Stairway_To_Heaven.flac
if i was renaming it manually i would use lz731201d%discnumber%_ $num(%track%,2)_$replace(%title%, ,_)
im doing one band at a time so the 'lz' is easy to add to the syntax and doesnt need to be parsed. but i need to automatically parse the yymmdd for multiple folders
To get the first part extracted, you could try: $regexp('Led Zeppelin - 1973-12-01 - Madison Square Garden, New York, NY',^(.).*? (.).*? - \d\d(\d\d)-(\d\d)-(\d\d) - .*,$1$2_$3$4$5)
which lead to:
"LZ_731201"
but im not trying to do a single folder im trying to parse from folders in same format, like
Led Zeppelin - 1973-12-01 - Madison Square Garden, New York, NY
Led Zeppelin - 1973-12-04 - Knickerbocker Arena, Albany, NY
Led Zeppelin - 1973-12-07 - Spectrum, Philadelphia, PA
Led Zeppelin - 1973-12-09 - Boston Garden, Boston, MA
and then ill have to do
Boston - 1974-02-01 - Madison Square Garden, New York, NY
Boston - 1974-02-04 - Knickerbocker Arena, Albany, NY
Boston - 1974-02-07 - Spectrum, Philadelphia, PA
Boston - 1974-02-09 - Boston Garden, Boston, MA
etc.
again they are in uniform format but some artists have one word names, some have four or more word names
To get just the date, try $regexp('Led Zeppelin - 1973-12-01 - Madison Square Garden, New York, NY',^.*? - \d\d(\d\d)-(\d\d)-(\d\d) - .*,$1$2$3)
To get just the date, try $regexp('Led Zeppelin - 1973-12-01 - Madison Square Garden, New York, NY',^.*? - \d\d(\d\d)-(\d\d)-(\d\d) - .*,$1$2$3)
No, they are not as they have different patterns to generate the initials
So there are different band names - I would have filtered for those that match the two-part names and then apply the expression anyway as that would automate a fair number of entries.
Then you could modify the expression and the filter to cater for just 1 part names and then treat the next batch... but that is up to you.
i dont need to generate the initials, can type them in myself as i will run the script forhundreds of folders for one artist at a time. ideally i want it to ignore everything in the folder name and just parse the date
if its easier i could bulk edit the folder names and take the artist out and add it back later so the folders just begin with dates
in which converter do i enter the above expression? nothing works when i put it in 'tag>filename' or 'filename>filename' (the latter of which requires two fields)
i fixed your syntax from 'driectory' to 'directory' and its now parsing the folder name within tag>filename converter,
normally i would use tag>filename converter and enter lz731201d%discnumber%_$num(%track%,2)_$replace(%title%, ,_)
replacing lz731201 with $regexp(%_directory%,^.*? - \d\d(\d\d)-(\d\d)-(\d\d) - .*,$1$2$3) returns the entire foldername and doesnt parse the date
Screendumps would tell so much more.
I am completely lost to what you do, which data can be found where and, given the exmple strings for folder names, I cannot reproduce that
is returned. Is this a differently structured folder name? ^.*? - \d\d(\d\d)-(\d\d)-(\d\d) - .*,$1$2$3)
works with
Led Zeppelin - 1973-12-01 - Madison Square Garden, New York, NY
as well as
Boston - 1974-02-09 - Boston Garden, Boston, MA
oops sorry, my mistake, the folders were
Led Zeppelin - 1973-12-01 Madison Square Garden, New York, NY
not
Led Zeppelin - 1973-12-01 - Madison Square Garden, New York, NY
seems to be working now, am testing with different artists
one more question, kind of an aside is there an easy way to bulk rename folders from
Artist - DD_MM_YY Venue, City, State
to
Artist - YYYY_MM_DD Venue City state
doesnt need to be in mp3tag, perhaps theres a linux or windows script that would do it easily
i can do it in a few steps using mp3tag and bulk rename in ubuntu but there is probably an easier way. the old folder names are terrible because they dont sort chronologically
tried that expression in 'format value' and it copied files from
"Boston - 01_01_11 Madison Square Garden, New York, NY"
to
"Artist - 20_02_01 Venue, City, State"