INTERACT FORUM

More => Old Versions => JRiver Media Center 26 for Windows => Topic started by: w_axlrose1 on August 14, 2020, 06:33:56 am

Title: Expression help
Post by: w_axlrose1 on August 14, 2020, 06:33:56 am
Hello all,

I'm wondering if anybody can please assist me with an expression to rename directories in which I keep my photos. Up until this point I had always used as an example the following directory format:

D:\Photos\Stonehenge 15-Jul-2020

What I'd like to be able to do is switch things around using the ISO 8601 date standard and put the date first so I end up with this:

D:\Photos\2020-07-15 Stonehenge

I've made some progress with the following expression in Rename, Move & Copy Files under the Directory expression box...

FormatDate([Date,0],yyyy-MM-dd) FileFolder()

This has resulted in renaming the folder as follows...

D:\Photos\2020-07-15 Stonehenge 15-Jul-2020

The crux of the question is does anybody know how to remove the now superfluous date from the end of the directory name? Since the unwanted portion of the directory name is always the last 12 characters (including the space) I was wondering if there was a way to get the expression to remove those last 12 characters automatically. That's as far as my thinking takes me.

Thanks to anyone that is able to help. :)
Title: Re: Expression help
Post by: marko on August 14, 2020, 06:48:24 am
In the "String Manipulation" section of the wiki expressions pages, you will find RemoveRight() (https://wiki.jriver.com/index.php/String_Manipulation_Functions#RemoveRight)...

removeright(FormatDate([Date,0],yyyy-MM-dd) FileFolder(),12)

ought to do it for you :)
Title: Re: Expression help
Post by: marko on August 14, 2020, 06:55:32 am
btw... always thrilled to learn people are using MC to manage their photos...

How are you finding the experience?

If you have time, perhaps you could add comments to this thread (https://yabb.jriver.com/interact/index.php/topic,126085.0.html)?

regards,
-marko
Title: Re: Expression help
Post by: w_axlrose1 on August 14, 2020, 07:52:17 am
In the "String Manipulation" section of the wiki expressions pages, you will find RemoveRight() (https://wiki.jriver.com/index.php/String_Manipulation_Functions#RemoveRight)...

removeright(FormatDate([Date,0],yyyy-MM-dd) FileFolder(),12)

ought to do it for you :)

Oh you star! Thanks very much, Marko. That's exactly what I needed.
Title: Re: Expression help
Post by: w_axlrose1 on August 14, 2020, 08:03:23 am
btw... always thrilled to learn people are using MC to manage their photos...

How are you finding the experience?

If you have time, perhaps you could add comments to this thread (https://yabb.jriver.com/interact/index.php/topic,126085.0.html)?

regards,
-marko

I'm actually finding the photo management to be exremely useful. Previously I had no real photo management and I'd simply browse the folders in Explorer which was too cumbersome once a lot of images were involved. For some reason I didn't fully digest that I already had the solution all along in JRiver which I had been using for music/video for quite a few years. I decided to give it whirl and imported all my images. Now I can find the image I need by location, date, person, camera, you name it by utilising JRiver's powerful search function. One of my favourite features (albeit quite a modest one) is the ability to 'locate on Google Maps'.