INTERACT FORUM
More => Old Versions => JRiver Media Center 21 for Windows => Topic started by: jacobacci on September 06, 2015, 09:31:18 am
-
The context of the question is that I am converting FLAC files to m4a.
I have several files that have target path names (incl. the filename) with >259 chars and they are causing problems in FLAC -> m4a conversion.
I am trying to shorten the paths to around 240 chars using the expression language. I have read up on the left, filename etc. functions in the Wiki, but could not find an expression that works. I need to extract the name of the full path (without the file extension), trim that from the right and then put the file extension back on.
I tried
=left(([filename],0),240).flac
and different permutations of this but that didn't quite do the job.
Could anyone suggest an expression? Thanks a lot
-
Try:
=left(removeright([filename],5),240).[file type]
-
Marko, seems to work brilliantly, thanks a lot
-
You're welcome.
-
Just one more question, Marko
In the WIKI I found the following:
filename(filepath, include suffix)
The FileName() function returns the file name part of filepath. Inclusion of the file's suffix depends on the include suffix argument.
0 Suppress file suffix
1 Include file suffix
Argument filepath is optional (defaults to [filename]).
Argument include suffix is optional (defaults to 1).
Could the 0 argument be used instead of truncating 5 letters from the right, if there were a mix of different file types, not all 4 letters?
-
Yes, like so...
=left(filepath()filename(,0),240).[file type]
-
Even more brilliant, thank you
-
Hi all
I have tried to use the above expression to shorten file paths the other day. For the life of me I could not figure out how I had done that the last time around. Which field do I paste the expression to?
I cannot select the "Filename" field in the tagging pane if more than one track is selected?
Thanks a lot
-
Hi all
I have tried to use the above expression to shorten file paths the other day. For the life of me I could not figure out how I had done that the last time around. Which field do I paste the expression to?
I cannot select the "Filename" field in the tagging pane if more than one track is selected?
Thanks a lot
Use the "rename, move, and copy tool".