INTERACT FORUM

Please login or register.

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

Author Topic: Is there any way to turn directory paths into keywords?  (Read 354 times)

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Is there any way to turn directory paths into keywords?
« on: February 07, 2021, 09:08:30 pm »

I have a bit of a mess of my files, and am trying to clean things up.  I have "educational" videos nested in several places, and to help me pull them all together, i thought I might be able to use MC to fill in keywords from every subdirectory, so that all videos in any folder with education in the path could be easily identified.  The problem for me is that I have no idea how to get all the subdirectories into the keywords field.  I'm sure you who are smarter than I can do this, and am hoping someone can lend a hand.

Some examples for my mess are

\Videos\Educational\Business\eBooks
\Documents\Business\Education
\Documents\Business\Real Estate\Education

Ideally, Educational, Business, eBooks, Real Estate, Education could all be scraped and listed as keywords for all files in these locations.

Fill Properties from Filename > Directories > then  \Videos\[Keywords]\[Keywords] doesn't grab more than one part of the path, which is different than \Videos\[Keywords]

thanks in advance for any help with this
Logged
pretend this is something funny

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Is there any way to turn directory paths into keywords?
« Reply #1 on: February 07, 2021, 10:06:42 pm »

Something like this?

Code: [Select]
=listlimit(replace(removeleft([filename (path)],3),\,;),99,1)&datatype=[list]
The problem is, there appears to be an issue in the MC tag editor, so you can only use this when you don't have any keywords for the file already. If there are pre-existing keywords, the MC tag editor bungles the expression evaluation (escaping the ; doesn't help).

But there's a way around that.  Select the files you want to modify, clear the keywords, and then you can paste this in.

Have fun...
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Re: Is there any way to turn directory paths into keywords?
« Reply #2 on: February 07, 2021, 10:09:29 pm »

thanks wer!

I'm off to bed now, but will have a play tomorrow.  I appreciate the help.
Logged
pretend this is something funny

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Re: Is there any way to turn directory paths into keywords?
« Reply #3 on: February 08, 2021, 06:45:42 am »

I can't quite figure out how to use this information to populate the keywords field.  I can put this formula into a pane, as an expression, and it seems to get all the keywords, but it's just a list in the panes, from which I can select, but that doesn't put them into the keywords field.  I can't put this formula into the fill from properties dialog, it doesn't do anything.

I suppose I can select every keyword from the list in the panes, then copy/paste into the keyword, but that's gonna be rather tedious.

Is there a way to use this formula to put the data directly into the keywords field that I'm missing?
Logged
pretend this is something funny
Pages: [1]   Go Up