INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: expressions assistance please . . .  (Read 563 times)

Abbra Cadabra

  • World Citizen
  • ***
  • Posts: 219
expressions assistance please . . .
« on: April 21, 2021, 12:05:57 pm »

Hello,
I need to modify a bundle of filenames and tags for consistency and have seen things like this done with expressions I believe, but I am not certain nor do I have a grasp on their use.

I have a collection of Live concert tapes which have been digitized. Unfortunately the Album name formats do not match across the collection causing difficulty sorting.

The 'good' files have the album as the concert they were from as for instance:
[1988-03-30] Meadowlands, East Rutherford, NJ

while the 'bad' files show for example:
1969-03-02  Filmore West, SF, CA [SBD]


So, my question is:
How do I modify the 'bad' files to add the [  ] around the date without manually editing each and every file?
I do not wish to modify the date format, only add the brackets around the date.

I read the Wiki and searched the Forum but only gained confusion.

Any assistance by a passing expression Guru would be greatly appreciated.   :)


Logged
I swear I am not here to drive you crazy!

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2616
Re: expressions assistance please . . .
« Reply #1 on: April 22, 2021, 03:30:35 am »

Do you want to rename the files themselves, or just change a tag value like [Album]?
The filename itself is not important, you should just fix the values in tags like [Album] and [Date (Release)], then you could have views sorted by date or album name and search your collection by any tag.

For instance, for your 1st album you could have:
[Album] = Live at Meadowlands Arena
[Artist] = Grateful Dead
[Genre] = Live Concert
[Date (Release)] = 1988-03-30 (or [Date Recorded])

You could create a couple of non-standard fields to hold more information:
[Location] = Meadowlands Arena, SF, CA
[Source] = SBD

Anyway, if you want to rename the files themselves then you should use the RMCF tool. Set it to "rename", uncheck all checkboxes except "Filename", and set the Rule to:
Code: [Select]
=if(regex([filename (name)],/#^\s*([\d\-]{10})(.+)#/,0),[trim([R1])] trim([R2]),[filename (name)])
If you just want to fix the contents of your [Album] tag (or other), then just set the tag value to:
Code: [Select]
=if(regex([Album],/#^\s*([\d\-]{10})(.+)#/,0),[trim([R1])] trim([R2]),[Album])
Logged

Abbra Cadabra

  • World Citizen
  • ***
  • Posts: 219
Re: expressions assistance please . . .
« Reply #2 on: April 22, 2021, 10:44:48 am »

Thank you muchly Zybex,

That worked . . ..   I used the
=if(regex([Album],/#^\s*([\d\-]{10})(.+)#/,0),[trim([R1])] trim([R2]),[Album])

to alter the Album name and from there was easy to rename as needed so folder names matched this format as well.

Again, thanks . . .  my concerts are now in my preferred naming format and order.
Logged
I swear I am not here to drive you crazy!
Pages: [1]   Go Up