INTERACT FORUM

Please login or register.

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

Author Topic: Split filename in 2 columns: how?  (Read 1009 times)

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 661
Split filename in 2 columns: how?
« on: August 12, 2010, 08:01:09 am »

Hi all,

I've got some 500 jpg's with the following lay out:
Adam & the Ants - Stand and Deliver (and so on)

I want to change the way of writing to Adam & the Ants - Stand and deliver (so: the title is just first word uppercase).

When I call this directory with jpg's in MC the filename is the whole name. To change the way of writing I want to split the filename in 2 columns: artist and title. And take it from there with Clean File Properties.

Is there a way to split it like this?

Thanks in advance!
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Split filename in 2 columns: how?
« Reply #1 on: August 12, 2010, 08:23:12 am »

when i understand it right, you want to fill the artist and the title fields in mc?
in that case a fill properties from filename should work. use [artist] - [name]
when you mean something else, you might want to checkout the ListItem expression.
Code: [Select]
ListItem([filename (name)],0,-)or maybe a bit cleaner
Code: [Select]
ListItem([filename (name)],0,/ - )this would give you the artist.
this the title
Code: [Select]
ListItem([filename (name)],1,/ - )
or when you want to change the filename only and clean the second part of the name of all the files you could try an expression in the tag window like
Code: [Select]
=ListItem([filename (name)],0,-)- Clean(ListItem([filename (name)],1,-))test it on one file first
when that does not help, maybe you can give a bit more details.



 :)
gab

edit: i dont think clean will help. FixCase might: http://wiki.jrmediacenter.com/index.php/Media_Center_expression_language#FixCase.28....29:_Changes_the_case_of_a_string.
Logged

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 661
Re: Split filename in 2 columns: how?
« Reply #2 on: August 12, 2010, 11:01:01 am »

Wow, Gap, thanks for this extensive answer!
However: I feel pretty stupid not to have realized that Fill Properties From Filename (and take it from there with Clean File Properties) would do sufficiently.

But I've stored your lessons in code in my MC-tutorial.

Thanks again!
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios
Pages: [1]   Go Up