Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Can foobar determine whether the 36th character of a filename is a spa (Read 2743 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Can foobar determine whether the 36th character of a filename is a spa

(Sorry about the the (ridiculous sounding) topic title, the last word was meant to be space.)

Hi all. Long story short, to facilitate compatibility between foobar and iTunes, I've been trying to find a way to truncate filenames above 40 characters (36 discounting the .mp3 extension), since iTunes cannot handle such long filenames. I've been using the renaming script "$cut(%tracknumber% %title%,36)" which has been pretty effective.

However, for truncated filenames, iTunes also disallows the last (i.e. 36th) character of a filename to be a space.
i.e., iTunes disallows "04 Ohm (Sommar Med Siv (Summer with ", automatically renaming it to "04 Ohm (Sommar Med Siv (Summer with".
In this case, I could use the script "$cut(%tracknumber% %title%,35)", but it would be a hassle to do this with multiple files all over the place.

So in layman terms, I'd like to know if there's a script that could perform something like: "if character 36 is a space, cut filename to 35 characters. otherwise cut to 36 characters".

Weird request, I know, but bear with me.  Cheers.

Can foobar determine whether the 36th character of a filename is a spa

Reply #1
$trim($cut(%tracknumber% %title%,36))



Can foobar determine whether the 36th character of a filename is a spa

Reply #4
Can we now turn this into the unofficial "giggle at iTunes" topic?

 

Can foobar determine whether the 36th character of a filename is a spa

Reply #5
Can we now turn this into the unofficial "giggle at iTunes" topic?
I still can not believe that iTunes really does not do something as trivial as file handling properly. Then again it is a widely installed piece of software. I guess it's the old rule of "worse is better".

EDIT: I found some relevant info regarding this... "bug":
http://www.ilounge.com/index.php/articles/...long-filenames/
https://discussions.apple.com/thread/3322627
https://discussions.apple.com/message/24144346#24144346
It's only audiophile if it's inconvenient.