INTERACT FORUM

Please login or register.

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

Author Topic: Expression to find album/folder name discrepancies  (Read 1149 times)

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Expression to find album/folder name discrepancies
« on: October 24, 2012, 02:27:46 pm »

I whipped up this regex expression

if(isEqual([Filename (path)],[[Year]] [Album],8),Correct, Incorrect)

To find albums not in a properly named folder.

However it marks the album \The Clash\[1977] The Clash\ as incorrect  ?

Anyone know why that would be?
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: RegEx to find album/folder name discrepancies
« Reply #1 on: October 24, 2012, 02:35:53 pm »

Weird,

I run a rename according to [[Year]] [Album]. It actually accepted and changed "[1977] The Clash" to "[1977] The Clash" and the files moved to Correct in the above regex expression.

I checked the physical folder, F2 in explorer to see if there were spaces ... it was literally "[1977] The Clash".

 ? ?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: RegEx to find album/folder name discrepancies
« Reply #2 on: October 24, 2012, 03:50:09 pm »

This works fine for me here.  See attached.

Do you have the correct year?  Does [Album] contain the year also?  For the expression to work, you need

  [Year] = 1977
  [Album] = The Clash

Technically, you should escape the outer brackets:

   if(isEqual([Filename (path)], /[[Year]/] [Album],8), Correct, Incorrect)

so that MC doesn't try to re-evaluate the expansion of [Year].

Also, you mean "expression" and not "regex", as there is no regular expression here.
Logged
The opinions I express represent my own folly.

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Expression to find album/folder name discrepancies
« Reply #3 on: October 24, 2012, 05:04:16 pm »

Yeh everything looked correct.

The thing is when it happens like that I don't think about gathering 'evidence', I start clicking around first. I ran the rename function and chuckled at the fact that it was going to rename to something identical and accepted it. Now, I can't reproduce it and it was the only folder that did it.

Ow ... doh! I have backups. It's midnight now but I'll get back on it tomorrow.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Expression to find album/folder name discrepancies
« Reply #4 on: October 24, 2012, 05:13:58 pm »

This just proves I need to go to bed... the tag [Year] is listed as 1978 in the backup files.

I don't know how many times I can overlook something so simple  :-[
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression to find album/folder name discrepancies
« Reply #5 on: October 24, 2012, 05:15:02 pm »

The 70's were a blur anyway.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up