INTERACT FORUM

Please login or register.

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

Author Topic: Help with expression language  (Read 740 times)

jondavis

  • World Citizen
  • ***
  • Posts: 132
Help with expression language
« on: March 18, 2024, 05:15:06 pm »

What I'm trying to do is mostly just trim off all the junk and just have the artist name left.

This is for the field: Filename (path)

These are just folder names.
Here is kinda what my folders look like now.


T:\Multimedia\Music Videos\Bon Jovi\Bon Jovi\New Jersey\Bad Medicine
T:\Multimedia\Music Videos\Bon Jovi\Bon Jovi - Livin' On A Prayer
T:\Multimedia\Music Videos\Wanted Dead Or Alive
T:\Multimedia\Music Videos\Bon Jovi - I'll Be There For You
T:\Multimedia\Music Videos\Bon Jovi\Bon Jovi\Runaway
T:\Multimedia\Music Videos\Great White\Great White - Face The Day [HQ]\
T:\Multimedia\Music Videos\Great White\Call It Rock And Roll HD\
T:\Multimedia\Music Videos\GREAT WHITE \Great White\Love Is A Lie (HD 1992 Official Music Video)\
T:\Multimedia\Music Videos\Lady Red Light\
T:\Multimedia\Music Videos\Great White\Great White - Rock Me\
T:\Multimedia\Music Videos\Great White\Great White - Save Your Love\
T:\Multimedia\Music Videos\Great White\Great White - Once Bitten Twice Shy\
T:\Multimedia\Music Videos\Great White\Great White -Shot In The Dark\

So I was trying maybe first back up all the folders to this...
T:\Multimedia\Music Videos\
then somehow add the artist on later

Basically if I could do this, (yea I know you can't) this is what I would want
T:\Multimedia\Music Videos\=[artist]

Any Ideas?
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help with expression language
« Reply #1 on: March 18, 2024, 06:45:01 pm »

Experiment with few files first!

if your artist field is already filled then it is just simple expression for filename (path) field like
=T:\Multimedia\Music Videos\[artist]

Or preferably use Rename, Move, & Copy Files tool (F6) to have preview and more control:
  Rename (moves files if directory changes)
  Check Directories
    Base Path = T:
    Rule = Multimedia\Music Videos\[artist]
Uncheck everything else if you only want to change directories

If you want to also change filename then check also Filename and use e.g. following rule or similar. up to you
 [Artist] - [Name]

Experiment with few files and look at the preview before committing to anything

WIKI: https://wiki.jriver.com/index.php/Rename,_Move,_and_Copy_Files

EDIT: fixed to use filename (path) instead of filename
Logged

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: Help with expression language
« Reply #2 on: March 18, 2024, 07:00:48 pm »

I think I got it.
I just renamed all the folders first to:  C:\Multimedia\Music Videos
then I did this....
=replace([Filename (path)], Music Videos, Music Videos\[artist])

Logged

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: Help with expression language
« Reply #3 on: March 18, 2024, 07:03:02 pm »

Experiment with few files first!

if your artist field is already filled then it is just simple expression for filename field like
=T:\Multimedia\Music Videos\[artist]


Yea I like this better.
Thanks
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help with expression language
« Reply #4 on: March 19, 2024, 03:45:29 am »

Small but very important fix to my advice is to of course use filename (path) field and not filename... if doing that live editing. Fixed my original message
Logged

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: Help with expression language
« Reply #5 on: March 19, 2024, 12:52:31 pm »

Thanks, yea I'm using - filename (path) and that worked very well.
Saved me a lot of time.
Logged
Pages: [1]   Go Up