Help - Search - Members - Calendar
Full Version: Points and questions (renaming, columnsui, beta)
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Shade[ST]
Good evening!

First and foremost, I'd like to thank all the foobar2000 devs for their humongous (and miraculous) work! Thank you thank you thank you so much -- I had tried using foobar2000 in it's version 0.83 and found operation was a little awkward.

I think it may be in part due to the fact that the special version which I installed was overloaded with components.. Maybe the distribution of such a version isn't a very good idea (unless preconfigured somewhat for novice users..)

However, I've been using the .9 beta ever since it was available to general public, and I must say, I LOVE it -- I've just recently experienced the fun of renaming scripts (with which I have two issues, I'll get to this now smile.gif

When renaming files, it seems foobar2000 only creates new paths if the forward slash (/) is used, when in the windows system (which foobar works on exclusively), the backslash (\) is used. Just a little point, but an odd one nevertheless.

Another point, is the behavior of the $replace(a,b,c) function in batch renamings : I noticed that using $replace(%title%,:,-) does not work : though it does display what I expect in the window preview (when editing), it does not display the expected result in the filename listing, and does not give expected behavior when renaming files either.

Of course, these are only minor issues, but every bit better is embetterment, right?

Peace,
Tristan (and thanks again!)

EDIT : I forgot..

Another point I would like to know, is if ColumnsUI is available for the current installment of foobar2000 (RC2006-02-21) or not? Will the b13 version work?

Thanks! (you'll get lots of this tongue.gif)
Synthetic Soul
QUOTE(Shade[ST] @ Feb 22 2006, 02:16 AM)
When renaming files, it seems foobar2000 only creates new paths if the forward slash (/) is used, when in the windows system (which foobar works on exclusively), the backslash (\) is used.  Just a little point, but an odd one nevertheless.
Not so. "%album artist%\%album%\%tracknumber% - %title%" works fine for me. This thread has some examples using backslashes. I'm not quite sure what you could be doing wrong, perhaps I've misunderstood you. Can you post the string you tested please?

QUOTE(Shade[ST] @ Feb 22 2006, 02:16 AM)
Another point, is the behavior of the $replace(a,b,c) function in batch renamings : I noticed that using $replace(%title%,:,-) does not work : though it does display what I expect in the window preview (when editing), it does not display the expected result in the filename listing, and does not give expected behavior when renaming files either.
Again, works fine for me. Tested using "%tracknumber% - $replace(%title%,:,-)" Can you post the string you tested please? What did happen to your filenames?

QUOTE(Shade[ST] @ Feb 22 2006, 02:16 AM)
Another point I would like to know, is if ColumnsUI is available for the current installment of foobar2000 (RC2006-02-21) or not?  Will the b13 version work?
A version isn't available at musicmusic's page. The b13 version didn't work with b14, so I doubt it will work with RC1. I'm sure it will be out very soon. In the meantime, test out your Tagz scripting with the default UI, it's a lot more satisfying.
Shade[ST]
[$num(%tracknumber%,2). ]$replace($replace(%title%,':','-'),'?',) displays :
09. Concerto no. 3 in F - Autumn- Allegro in format preview and
09. Concerto no. 3 in F - Autumn_ Allegro in main (file list) preview. Renames the file to 09. Concerto no. 3 in F - Autumn_ Allegro

On a side note, I am using b13 here (columnsui) -- I can't seem to find the renaming function on the RC.

(I tested for file pathes, and you were right, both slashes work. Thanks for that heads up.. However, the other issue is still on the loose, IMO.)
NogginJ
is the ':' maybe an illegal character in windows filenames? if so i think i heard foosion say it uses '_' instead of illegal characters.

maybe if foobar gave a friendly warning 'hey did you know you are using illegal characters and im going to cahnge them because i know better' would be nice.
foosion
QUOTE(Shade[ST] @ Feb 22 2006, 05:56 PM)
On a side note, I am using b13 here (columnsui) -- I can't seem to find the renaming function on the RC.
*
Did you select masstagger in the installer (under optional components)?

QUOTE(Shade[ST] @ Feb 22 2006, 05:56 PM)
(I tested for file pathes, and you were right, both slashes work.  Thanks for that heads up.. However, the other issue is still on the loose, IMO.)
*
Invalid filename characters in tags are replaced by an underscore when the field reference/tag access function is evaluated, so by the time $replace() is applied the substitution has already taken place. This is the flipside of being able to include path separators ('\' and '/') anywhere in the script.
Synthetic Soul
OK, I see what you mean there. I can't explain that one.

With 0.9RC you need to ensure that you install Masstagger when you run the installer - not all components are installed by default.

Edit: Damn, I really am getting slow in my old age... two new posts!

@NogginJ: I think Shade[ST]'s script was intended to replace the illegal character ":" with a character of his choosing ("-"), rather than foobar's character of choice ("_" in all situations).
NogginJ
question marks are an illegal character as well though :\

edit: ive never used $replace function personally but im just guessing this might be the problem.
Shade[ST]
QUOTE(foosion @ Feb 22 2006, 11:12 AM)
Invalid filename characters in tags are replaced by an underscore when the field reference/tag access function is evaluated, so by the time $replace() is applied the substitution has already taken place. This is the flipside of being able to include path separators ('\' and '/') anywhere in the script.

I think several people will agree with me that it's more important to manage illegal characters than path seperators.. Because underscores, if you want to change them afterwards, usually convert to spaces, but they could convert to '?', '&' '/' ':' or even '"'...

Is there a way we can change each character individually, in any case? Perhaps by using $meta(title) instead, something like that? Is it possible to give an unevaluated function that allows us to replace the illegal chars? (which would only signal errors, but not be able to rename files if errors exist.. : "At least a file name contains illegal characters : renaming aborted" )

That would be the best wink.gif

PS : Can I help dev' Foobar2000? (main) or is this a closed source project?
Synthetic Soul
QUOTE(NogginJ @ Feb 22 2006, 05:26 PM)
question marks are an illegal character as well though :\

edit: ive never used $replace function personally but im just guessing this might be the problem.

Shade[ST]'s code will first replace ":" with "-" and then replace "?" with "".

FYI: Instead of using:

$replace($replace(%title%,':','-'),'?',)

... he could have used:

$replace(%title%,':','-','?',)
Shade[ST]
QUOTE(Synthetic Soul @ Feb 22 2006, 11:34 AM)
FYI: Instead of using:

... he could have used:

Interesting for potential future use, but unfortunately useless sad.gif

I'd have to replace all the underscores in my filename, but if I have both colons ':' and question marks '?', it'll screw up.. sad.gif
golphcart
QUOTE
' date='Feb 22 2006, 11:40' post='366326']
Interesting for potential future use, but unfortunately useless sad.gif

I'd have to replace all the underscores in my filename, but if I have both colons ':' and question marks '?', it'll screw up.. sad.gif


only if they are back-to-back in the filename. wink.gif
which is highly unlikely...

oh and foosion:
thanks for finally explaining to me why '/' and '\' are not responsive to the replace function. now there are just two characters left from my previous thread to be explained ( the ':' and the '|' )


p.s. - sorry for the thread revival...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.