INTERACT FORUM

Please login or register.

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

Author Topic: MC12 Rocks - 2 Little Qs  (Read 5444 times)

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
MC12 Rocks - 2 Little Qs
« on: October 30, 2007, 06:15:08 pm »

Hi all - long time no post.
Just upgraded to MC12 - I've been happily using MC11 throughout our for years and figured you guys deserved more money for the great work that it does.

Couple of questions:-

1) How can I "Fill Properties from Filename" working forward along the path rather than backwards?
I have images in directories so:
     M:\ProjectName\Documents\Images\ or
     M:\ProjectName\Documents\Date\Images\ or
     M:\ProjectName\Phase\Documents\Date\Images or
     M:\ProjectName\Year\Documents\Images\ or - many others
I want to autofill in a field called "Project Name".
Because the folder structure has varying length and because the "Fill Properties from Filename" works backward from the end rather than forward from the start of the path this is proving difficult.
At the moment no one combination of [projectname]\[ignore]\[ignore]\[ignore]\ will deal with the differing path lengths.

2) Is there a way that I can create a custom field for picture aspect ratio

3) Did you know that "Resize Image" strips the Windows field "Date Picture Taken"?
The MC operation must "save as" rather than a straight overwrite which would retain this field for windows to read.
MC handles all this data, I know, but it is still convenient to be able to check when a picture was taken as you are cruising around in Windows Explorer.  Modified, Created an Last Accessed Fields all remain untouched.

Wonderful work as ever.
Regards
Mark
Logged

jgreen

  • Citizen of the Universe
  • *****
  • Posts: 2419
Re: MC12 Rocks - 2 Little Qs
« Reply #1 on: October 30, 2007, 07:29:28 pm »

Calli--

Not that this is what you wanted to hear, but are you willing to add one directory above [Project Name] in the dir structure, say "Projects"?  With this you would have:

M:\Projects\[ProjectName]\[Phase]\Documents\[Date]\Images

Which might be filled thus:

M:\Projects\Summer Vacation\Even\Documents\103007\Images

And which could be parsed thus (at least it works for me):

M:\Projects\[ProjectName]\*


Logged

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
Re: MC12 Rocks - 2 Little Qs
« Reply #2 on: October 30, 2007, 08:16:59 pm »

Hey thanks for the quick reply.

I seem to get different results.

For a structure like this - M:\Projects\ProjectName\Folder\Folder\Folder\Folder\filename.jpg

using no wildcard like this:-
M:\Projects\[ProjectName]
inserts the foldername from this folder:-
M:\Projects\ProjectName\Folder\Folder\Folder\This Folder\filename.jpg

using 1 wildcard like this:-
M:\Projects\[ProjectName]\*
inserts the foldername 1 back from the filename - like this:-
M:\Projects\ProjectName\Folder\Folder\This Folder\Folder\filename.jpg

using 2 wildcards like this:-
M:\Projects\[ProjectName]\*\*
inserts the foldername 2 back from the filename - like this:-
M:\Projects\ProjectName\Folder\This Folder\Folder\Folder\filename.jpg

using 3 wildcards like this:-
M:\Projects\[ProjectName]\*\*\*
inserts the foldername 3 back from the filename - like this:-
M:\Projects\ProjectName\This Folder\Folder\Folder\Folder\filename.jpg

It works backwards through the path, not forward.
The number of wildcards I put equals the number of skipped directories away from filename.jpg towards the drive letter NOT the other way, which is what I need.

Appreciate your help.

Cheers
Mark
Logged

jgreen

  • Citizen of the Universe
  • *****
  • Posts: 2419
Re: MC12 Rocks - 2 Little Qs
« Reply #3 on: October 30, 2007, 08:48:26 pm »

Calli, you're right--sorry I suggested you add that stupid directory.  The dependent dirs I tried this on all had the appropriate number of subs, while the top level dirs didn't.  I thought it was a (.) problem.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MC12 Rocks - 2 Little Qs
« Reply #4 on: October 30, 2007, 08:49:45 pm »

Are the source files all in the same place?  You can use find and replace on the [Filename] tag and it will move files if it needs to.

You can also use expressions in the [Filename] tag.  If it would work better, you can even use the =RemoveLeft() expression to remove pieces of the existing [Filename] tag and insert your own (just do TrimLeft on the [Filename] tag with them selected.  If you prefix what you type in one of the tag fields with an = sign, you can even put in other tags and whatnot.

So, for example, things like:

=M:\[Project Name]\[Genre]\[Artist]\[Album]\[track #] - [Name].mp3

or if you already had:
c:\OldFolder\Documents\[Date]\Images

You could do things like:

=M:\Projects\[ProjectName]\[Phase]\RemoveLeft([Filename], 13)

To get what you want.

You can use any of the functions in the  the expression language as well, so using stuff like If() and IsEmpty() are cool.

You can construct pretty much anything you need using conditional if statements and editing of the field directly.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
Re: MC12 Rocks - 2 Little Qs
« Reply #5 on: October 30, 2007, 09:07:03 pm »

Hey Glynor, Thanks for your input.

I don't want the files to move.

I want to "Fill Properties from Filename".
But the length of the paths varies.

I have images in directories so:
     M:\ProjectName\Folder1\Folder2\filename.jpg or
     M:\ProjectName\Folder1\Folder2\Folder3\filename.jpg  or
     M:\ProjectName\Folder1\Folder2\Folder3\Folder4\filename.jpg etc

I want to autofill a field called "Project Name".

Because the folder structure has varying length and because the "Fill Properties from Filename" works backward from the end rather than forward from the start of the path this is proving difficult.
At the moment no one combination of [projectname]\*\*\* will deal with the differing path lengths.

Your answer is good but doesn't address this problem.

Cheers
Mark
Logged

jgreen

  • Citizen of the Universe
  • *****
  • Posts: 2419
Re: MC12 Rocks - 2 Little Qs
« Reply #6 on: October 30, 2007, 10:06:30 pm »

Calli--

Let me suggest a non-good answer that I believe WILL (temporarily) address the problem.  Downside:  you've likely already thought of this and dismissed it.

From your question I get the impression that [ProjectName] is the only field left to fill, or the only field weighing on your mind.  Since it is the top level (unless you took my other stupid advice) is will sort easily under "pathname".  I would simply skip this in "Fill Properties. . ." and simply sort for it in your audio view, select each group of projects and manually rename the project field to match. 

Inelegant?  Enough to put a gleam in Webster's eye (I mean the guy who wrote the dictionary, not the kid from TV), but it will get the job done in short order.

This of course assumes that you've got a fairly manageable number of projects.  From my own indolent perspective, I can't imagine any more than a handful over the course of a lifetime.  If you've got a whole lot of them, well, good thing you're posting the question . . . 
Logged

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
Re: MC12 Rocks - 2 Little Qs
« Reply #7 on: October 31, 2007, 01:15:55 am »

Nope, sorry glynor jgreen

I'm not above a bit of inelegance but there are too many Projects for that idea to work.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: MC12 Rocks - 2 Little Qs
« Reply #8 on: October 31, 2007, 05:23:28 am »

Actually, forget all that palava, (this is an edit that replaces a whole lot of messing around with one simple solution :D
Select all files in question and send them to Playing Now, then, in the tag action window, click to edit your [ProjectName] field and enter the following: =[filename (path)] and press enter.

Once the tags are saved close MC and then download and install this plugin. It's called "Replace Master" and is a rather nifty but sadly discontinued (read no longer supported) tool made for us by KingSparta.

You would fill out the settings like so: (replacing D:\ with M:\ naturally)


and then hit the batch button on the 'main' tab. and the job will be done in a jiffy. Sorted.

Well, I thought it was. Calling Mr. Green or Mr Sparta, or anyone who has the last release of this plugin? I messed up over here and I do not have the last release. The version I have here has the "Batch" button disabled. What a feckin' nightmare. Could anyone who has a version that installs and works please send me (and callithumpian if he/she so desires) a copy of it. please? :)

Calli, if we don't get a response, the version I have that works, allbeit without a batch button, can be downloaded from Here

the original replace master thread can be read here, seems there might have been a slight problem with the very last version released....

Have fun.
-marko.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: MC12 Rocks - 2 Little Qs
« Reply #9 on: October 31, 2007, 06:52:32 am »

2) Is there a way that I can create a custom field for picture aspect ratio
I don't think there is, no, which is by no means to be considered a definitive answer.

3) Did you know that "Resize Image" strips the Windows field "Date Picture Taken"?
The MC operation must "save as" rather than a straight overwrite which would retain this field for windows to read.
MC handles all this data, I know, but it is still convenient to be able to check when a picture was taken as you are cruising around in Windows Explorer.  Modified, Created an Last Accessed Fields all remain untouched.
MC12 prompts the user that resizing will "alter the original image". Apart from the obvious alteration a resize will make, there's also the not so immediately obvious loss of important metadata to take into consideration too. If you want to pursue this particular issue further, I'd suggest a new thread would probably serve best.

-marko.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MC12 Rocks - 2 Little Qs
« Reply #10 on: October 31, 2007, 08:41:43 am »

Hey Glynor, Thanks for your input.

I don't want the files to move.

Yeah.  I missed that.  Sorry.

Oh, and...

Nope, sorry glynor.

I'm not above a bit of inelegance but there are too many Projects for that idea to work.

That wasn't me.  It was jgreen who had the inelegant idea (but nice try jgreen).   ;)

I was getting towards Marko's recent idea, but he got there first.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
Re: MC12 Rocks - 2 Little Qs
« Reply #11 on: October 31, 2007, 08:50:02 pm »

That's a likely looking work-around Marko, Thanks
But without the batch button it's a no-go.

For years I've been telling people that there's nothing MC can't do when it comes to managing your Media.
I've been trying to make this work for a photographer friend to whom I recommended MC on that very basis.

I so surprised and somewhat disappointed that it can't pluck the first folder name from a path and put it into a custom field!

Cheers
Mark
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: MC12 Rocks - 2 Little Qs
« Reply #12 on: October 31, 2007, 10:33:01 pm »

So we just need an expression function that breaks a string into a list using any delimiter (backslash in your case) and returns the n-th item in the list (2 in this case)?  Then you would in-place edit like =ListItem([Filename], \, 2)

If this will do the trick, we can add the function to the next build.  Let us know.
Logged
Matt Ashland, JRiver Media Center

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
Re: MC12 Rocks - 2 Little Qs
« Reply #13 on: October 31, 2007, 11:48:10 pm »

That sounds like the very thing Matt!

However, a check box next to "Directories" in the "Fill Properties from Filename" along the lines of:

    "Read Folders from Start of Path" or
    "Read Directory Struture from Left to Right"

                             ..........might be neater integration of functionality.

But I can work with an expression function.
I expect, though, that it would be possible to create a custom column that uses the function rather than have to in-place edit for all new importees?

Speaking of expression functions, is there a function in MC that will return a picture's aspect ratio??

Cheers
Mark
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: MC12 Rocks - 2 Little Qs
« Reply #14 on: October 31, 2007, 11:52:02 pm »

Can't you just divide the width by the height?  Then round?  I guess that would give you a decimal value.

Speaking of which: is there a way to just run a "question" like that?  If you searched for that value it wouldn't really be able to do anything...yea, 1920/1080 is 1.78 but that doesn't necessarily return any videos.  I guess you could say > or < and then videos would be returned if that was true.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: MC12 Rocks - 2 Little Qs
« Reply #15 on: November 01, 2007, 03:42:14 pm »

In build 362 and later, use this in Rename From Properties:
ListItem([Filename (path)], 2, \)

More information about the coming list expression functions here:
http://wiki.jrmediacenter.com/index.php/Media_Center_expression_language

Logged
Matt Ashland, JRiver Media Center

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: MC12 Rocks - 2 Little Qs
« Reply #16 on: November 01, 2007, 04:02:44 pm »

nice.

Thanks, looks interesting, especially if, like Calli says, we can use these to make expression based panes or columns.

Our english teacher at high school (Mr. Dames) would always berate us for using the word "nice". He said that it was a bland word that conveyed little or no meaning at all, and would ask us what we meant when we said "nice". Upon telling him, he would suggest, with exasperation, that we write that instead!! To this day, whenever I use the word, I think of him.

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: MC12 Rocks - 2 Little Qs
« Reply #17 on: November 01, 2007, 04:39:56 pm »

To this day, whenever I use the word, I think of him.
That's a nice story, marko.

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: MC12 Rocks - 2 Little Qs
« Reply #18 on: November 01, 2007, 04:52:09 pm »

Thanks, looks interesting, especially if, like Calli says, we can use these to make expression based panes or columns.

You can, Borat.
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MC12 Rocks - 2 Little Qs
« Reply #19 on: November 01, 2007, 05:50:33 pm »

He said that it was a bland word that conveyed little or no meaning at all, and would ask us what we meant when we said "nice".

The funny thing is that, like so much with language, it is somewhat regional.  I felt very similarly to Mr. Dames about the word "nice" until I moved to New England.  Up here, "nice" has much the same colloquial connotation as "cool" or "sweet" or "bitchin" (when said with the proper inflection).  In fact, while all the tourist literature refers to "wicked" as that word, basically of the people I've heard use the word "wicked" are all in their 60's or are trying to appeal to the tourists.

So... Up here, you could certainly hear a conversation like:

"I just won the lottery and went out and bought a new Ducati."

"Nice."
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
Re: MC12 Rocks - 2 Little Qs
« Reply #20 on: November 01, 2007, 11:33:51 pm »

That is sensational Matt - just the ticket, thankyou.

As for nice.....
Quote
Up here, "nice" has much the same colloquial connotation as "cool" or "sweet" or "bitchin" (when said with the proper inflection).

This newly-cool connotation is not uncommon, we have it here in Australia, but it derives from an ironic play upon the very blandness against which Mr Dames was railing.

You say "nice" in such a way that it is well understood that you must have meant so much more than just boring old "nice".

Cheers
Mark
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: MC12 Rocks - 2 Little Qs
« Reply #21 on: November 01, 2007, 11:51:02 pm »

Your teacher probably wanted more emphasis: say Really Extra Nice & Good.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: MC12 Rocks - 2 Little Qs
« Reply #22 on: November 02, 2007, 04:13:37 am »

In build 362 and later, use this in Rename From Properties:
ListItem([Filename (path)], 2, \)

More information about the coming list expression functions here:
http://wiki.jrmediacenter.com/index.php/Media_Center_expression_language

Nice but you still can't get the last directory in the path..unless you say how many items in ::)

If i had say

E:\folder1\folder2\folder3
F:\folder1\folder2\folder3\folder4
G:\folder1\folder2

 and i only wanted to get the last folder from each path if i wanted to know just the folder said item was contained in and save that to a custom field via an expression.

So how bout allowing a way to say last in that function so you can get the last folder and don't need to know or specify how many directories precede it.

ListItem([Filename (path)], -1, \)

Same has also been requested here
Logged

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
Re: MC12 Rocks - 2 Little Qs
« Reply #23 on: November 02, 2007, 05:00:10 am »

I don't understand hit_ny!

Getting the last folder in the path is what happens now, by default.
That is the natural and long-standing behaviour of MC.

In a folder structure M:\Folder1\Folder2\Folder3\Album\Filename.mp3
you enter [album]\ in the Directories part of File Properties from Filename.

In a folder structure M:\Folder1\Folder2\..\..\..\..\..\FolderN\Album\Filename.mp3
you still enter [album]\ in the Directories part of File Properties from Filename.

In a folder structure M:\Folder1\Folder2\..\..\..\..\..\FolderN\Album\FolderN+2\Filename.mp3
you enter [album]\[ignore] in the Directories part of File Properties from Filename.

That was what I was I started this thread whining about! -that the "Fill Properties from Filename" function counts backwards from the last folder.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: MC12 Rocks - 2 Little Qs
« Reply #24 on: November 02, 2007, 05:51:01 am »

..that works.

So i use [Folder]/ and then do a fill properties from filename :)

It requires the extra step of doing Fill Files from Properties just to populate it...every time you add new albums.

I'm looking for an automatic way to save that last folder to a custom field [Folder]..say ?
..for every album i have, and ones i am going to get :)

My idea here was all you would need to do is enter

=(ListItem([Filename (path)], -1, \))

in the defnition the custom field [Folder]

Done ;)

Another idea here is the -ve could indicate which extreme to set the anchor or direction to go from, in this case right to left whereas the default way is left to right.
Logged

Callithumpian

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 487
  • Subvert the Dominant Paradigm
Re: MC12 Rocks - 2 Little Qs
« Reply #25 on: November 02, 2007, 06:31:43 am »

Quote
Another idea here is the -ve could indicate which extreme to set the anchor or direction to go from, in this case right to left whereas the default way is left to right.
Default at the moment is right to left but, see, I think you're onto it there.
An option to go from which ever way you need.

I suggested above a toggle box next to "Directories" in the "Fill Properties from Filename" along the lines of:

    "Read Folders from Start of Path" or
    "Read Directory Struture from Left to Right"

Then we'd both be able to autofill our custom columns without recourse to arcane function expressions.
You with the last folder and me with the first, justy with a tick of the box.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: MC12 Rocks - 2 Little Qs
« Reply #26 on: November 02, 2007, 06:35:21 am »

Did i thank you for that little [Album]\

..GEM of a suggestion :D

why is that the obvious solutions get overlooked sometimes, i blame Fill from Properties, too much hidden power lurking in there!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: MC12 Rocks - 2 Little Qs
« Reply #27 on: November 02, 2007, 05:09:15 pm »

Nice but you still can't get the last directory in the path..unless you say how many items in ::)

Use ListCount(...) to get the number of items in the list.

However, the easier solutions proposed above are better in this case.
Logged
Matt Ashland, JRiver Media Center

ThoBar

  • Citizen of the Universe
  • *****
  • Posts: 992
  • Was confishy
Re: MC12 Rocks - 2 Little Qs
« Reply #28 on: November 03, 2007, 12:12:47 am »

looking forward to trying this new functionality. hit_ny pointed out, its exactly (I think) waht I requested in the other thread. Thanks Matt
Logged
Pages: [1]   Go Up