INTERACT FORUM
More => Old Versions => Media Center 11 (Development Ended) => Topic started by: KingSparta on March 13, 2005, 11:07:15 am
-
What Would Be Nice Is A Rule Modifyer
Path:X:\MyMusic\
Rule: ([Artist],1,1)\[Artist]\[Album]
Beatles - White Album
Would Be Saved As
x:\MyMusic\B\Beatles\White\
Bachman Turner Overdrive - Anthology (Disk 1), The
Would Be Saved As
x:\MyMusic\B\Bachman Turner Overdrive\Anthology (Disk 1), The\
It sure would clean things up in folders if this rule was avail (or something like it)
-
Nice idea KS!
I would use this feature if it were available.
-
I would use it if I could apply the same logic to sort my pictures!
Rule: ([Date],7,4)\([Date],4,3)
Would Be Saved As
Drive:\\2005\08\Files.jpg
-
Great idea. It could be extended to allow users to create rules that could be saved under the Rename files from properties function e.g. If artist name beings with A thru M use this path else use a different path. That would be useful where you have to split your files over several drives.
-
Next MC 11 will add a function Mid(...) to the expression evaluator to let you do this.
"Rename Files From Properties..." will support expressions.
Here are samples:
Mid([Artist])\[Artist]\[Album] -> A\Abba\Gold
Mid([Artist], 0, 1)\Mid([Artist], 1, 1)\[Artist]\[Album] -> A\b\Abba\Gold
-
oh matt
Are you married?
I love you long time
i guess with the MC version lenth = "0" really means "1"?
normaly (In visual basic at lease) the syntax is like (using your sample)
Mid([Artist], 1, 1)\Mid([Artist], 2, 1)\[Artist]\[Album] -> A\b\Abba\Gold
Returns a Variant (String) containing a specified number of characters from a string.
Syntax
Mid(string, start[, length])
The Mid function syntax has thesenamed arguments:
Part Description
string Required.String expression from which characters are returned. If string containsNull, Null is returned.
start Required;Long. Character position in string at which the part to be taken begins. If start is greater than the number of characters in string, Mid returns a zero-length string ("").
length Optional; Variant (Long). Number of characters to return. If omitted or if there are fewer than length characters in the text (including the character at start), all characters from the start position to the end of the string are returned.
Remarks
To determine the number of characters in string, use the Len function.
Note Use the MidB function with byte data contained in a string, as in double-byte character set languages. Instead of specifying the number of characters, thearguments specify numbers of bytes. For sample code that uses MidB, see the second example in the example topic.
-
oh matt
Are you married?
I love you long time
:-*
i guess with the MC version lenth = "0" really means "1"?
normaly (In visual basic at lease) the syntax is like (using your sample)
We were using a reversed parameter order from VB, but we may as well use the VB model. Here's the updated doc:
Mid(...): Retrieves specified characters from a value.
Value: the value to get characters from
Start: the character to start at (optional: defaults to 0)
Characters: the number of characters to get (-1 returns all) (optional: defaults to 1)
-
It's small things like making a request and having it fulfilled within 2 days that reminds me why I paid my 10 dollars to upgrade to v.11.
Thanks guys :D
-
We were using a reversed parameter order from VB, but we may as well use the VB model. Here's the updated doc
it may be easyer for users to use if the VB structure was followed when dealing with strings
as for "Abba", most users would think "A" would be "1" and the second chr "b" would be "2"
and some would not know who AbbA is, but thats another story
-
Is this something that can be used to mandate saving certain parts of the alphabet to a particular hard drive or folder?
Such as:
IF ([Artist], 1, 1)=a-j THEN Path=E:\Music1, IF ([Artist], 1, 1)=k-z, THEN Path=F:\Music2
Yes.
There's more info on if statments here:
http://www.jrmediacenter.com/DevZone/DBExpressions.htm
Take note of the IsRange(...) function.
Here's a simple sample:
Path: If(IsRange([Artist], a-m), D:, E:)\Music
This would use D:\Music for a-m artists and E:\Music for other artists.
-
3. NEW: Added Mid(...) and IsRange(...) functions to expression evaluator.
One question
in the sample Mid([Artist], 0, 1)\Mid([Artist], 1, 1)\[Artist]\[Album] -> A\b\Abba\Gold
what happens if the first char defind in the mid$ is a "\", "/", "?" etc...
that is not compatable with drive dir naming structures?
-
One question
in the sample Mid([Artist], 0, 1)\Mid([Artist], 1, 1)\[Artist]\[Album] -> A\b\Abba\Gold
what happens if the first char defind in the mid$ is a "\", "/", "?" etc...
that is not compatable with drive dir naming structures?
Invalid characters get replaced by a valid character. Underscores I think...
-
This is a great addition to MC. As I'm new to MC11 this is the first time I've come across expression evaluators. As is often the case with this sort of stuff (as marko points out) it's complicated for most of us but then appears very simple when you have a few good examples.
So the reason for this rambling post is to ask if it's possible to have a sticky thread that lists all the difference expression evaluators that currently exist along with some examples. This will make up for the lack of help documentation prior to official release.
-
You're not typing the word 'path' are you? I think he's just trying to say that the If expression goes in the box where you would normally put the path or directory name.