INTERACT FORUM

Please login or register.

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

Author Topic: swap(), but the other way around  (Read 1069 times)

jacobacci

  • Galactic Citizen
  • ****
  • Posts: 256
swap(), but the other way around
« on: July 29, 2024, 04:15:37 am »

All person names in my library (album artist, artist, composer etc.) are lastname, firstname to allow for sorting in windows explorer. I now want to copy the person fields to the personsort fields (artistsort etc.) and then reverse the order of the normal fields to firstname lastname. The swap() function seems to do the opposite of what I want to achieve. Is there a function I can use to turn lastname, firstname into firstname lastname or do I need to use regex?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10943
Re: swap(), but the other way around
« Reply #1 on: July 29, 2024, 04:25:32 am »

Unswap(), just a few lines below on the same wiki page. :)
Logged
~ nevcairiel
~ Author of LAV Filters

jacobacci

  • Galactic Citizen
  • ****
  • Posts: 256
Re: swap(), but the other way around
« Reply #2 on: July 29, 2024, 04:30:13 am »

Brilliant, thanks a lot
Logged

jacobacci

  • Galactic Citizen
  • ****
  • Posts: 256
Re: swap(), but the other way around
« Reply #3 on: July 31, 2024, 08:14:56 am »

Unswap worked perfectly, thanks a lot.
I am currently testing unswap on a folder containing ca. 60k Files. I need to do unswaps on three fields:
=Unswap([ALBUMARTISTSORT])
=Unswap([ARTISTSORT])
=Unswap([COMPOSERSORT])
in order to unswap the Album Artist, Artist and Composer fields.
Writing the tags for each unswap takes around 15 minutes. Is there any way I can apply the three unswaps to the library first and then write the tags through to the files in one go?

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: swap(), but the other way around
« Reply #4 on: July 31, 2024, 08:25:22 am »

Take a look at the wiki topic on Library Tools. 

Update tags from Library.

You can also set MC to always keep the tags updated.
Logged

jacobacci

  • Galactic Citizen
  • ****
  • Posts: 256
Re: swap(), but the other way around
« Reply #5 on: July 31, 2024, 09:05:31 am »

You can also set MC to always keep the tags updated.

Ah, I had the option 'Update Tags when File Info changes' set to on, so as soon as I clicked enter on the formula, MC started writing the tags to disk.
Logged
Pages: [1]   Go Up